Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: [Solved]: Undefined Index: SCRIPT_NAME, REMOTE_ADDR  (Read 51101 times)

0 Members and 2 Guests are viewing this topic.

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
[Solved]: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« on: June 10, 2004, 11:22:46 pm »

At the top of all my pages it says this...


Warning: Undefined index: SCRIPT_NAME in /<my site address>/gallery/include/init.inc.php on line 97

Warning: Undefined index: REMOTE_ADDR in /<my site address>/gallery/include/init.inc.php on line 104

Any ideas why? And how to fix that?

The other error is that every time I try to upload a photo, it says "Impossible to move" . What's the problem there?

Thanks for any help
« Last Edit: June 11, 2004, 06:29:44 am by hyperion »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Just installed, getting errors
« Reply #1 on: June 10, 2004, 11:26:59 pm »

your server seems to be set up improperly. Try silly_safe_mode (refer to documentation).

GauGau
Logged

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Just installed, getting errors
« Reply #2 on: June 11, 2004, 12:55:21 am »

Thanks very much for the tip. Unfortunatly, adding that line like it said to do did nothing. Any other thoughts?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Just installed, getting errors
« Reply #3 on: June 11, 2004, 01:15:16 am »

As I said: your server is not set up properly. Check what version of PHP you're running (use the phpinfo link from the admin tool). Check if you have a server var named SCRIPT_NAME and/or REMOTE_ADDR.

GauGau
Logged

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Just installed, getting errors
« Reply #4 on: June 11, 2004, 01:54:25 am »

It would appear that I have both of those.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Just installed, getting errors
« Reply #5 on: June 11, 2004, 02:12:40 am »

Provide a link, please.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #7 on: June 11, 2004, 02:18:45 am »

Activate debug mode.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #8 on: June 11, 2004, 02:28:49 am »

Done
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #9 on: June 11, 2004, 02:33:38 am »

Post lines 80 through 110 of your init.inc.php file.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #10 on: June 11, 2004, 02:53:46 am »

}

    if (is_array($HTTP_GET_VARS)) {
        foreach ($HTTP_GET_VARS as $key => $value) {
            $HTTP_GET_VARS[$key] = strtr($value, $HTML_SUBST);
            if (isset($$key)) unset($$key);
        }
    }

    if (is_array($HTTP_COOKIE_VARS)) {
        foreach ($HTTP_COOKIE_VARS as $key => $value) {
            if (isset($$key)) unset($$key);
        }
    }
}
// Initialise the $CONFIG array and some other variables
$CONFIG = array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
$REFERER = urlencode($PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?' . $HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$FORBIDDEN_SET = '';
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
// Record User's IP address
$raw_ip = stripslashes($HTTP_SERVER_VARS['REMOTE_ADDR']);

if (isset($HTTP_SERVER_VARS['HTTP_CLIENT_IP'])) {
    $hdr_ip = stripslashes($HTTP_SERVER_VARS['HTTP_CLIENT_IP']);
} else {
    if (isset($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'])) {
        $hdr_ip = stripslashes($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']);
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #11 on: June 11, 2004, 03:18:53 am »

Post the ID line from the beginning of the file. 

It should look something like this:

Code: [Select]
$Id: init.inc.php,v 1.33 2004/06/04 17:16:34 datajack Exp $
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #12 on: June 11, 2004, 03:21:28 am »

Code: [Select]
// $Id: init.inc.php,v 1.27 2004/03/31 04:55:05 hyperion01 Exp $
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #13 on: June 11, 2004, 03:24:23 am »

Which package did you download?
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #14 on: June 11, 2004, 03:33:14 am »

cpg1.3.0beta4
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #15 on: June 11, 2004, 03:47:08 am »

You should be using 1.3.0 (stable).  You may rip out your current install by deleting the files and database tables, and then you would install the stable package.  Alternatively, you may overwrite the files with the stable package files, but you must run the update.php file to execute the database changes. Please post again on this matter after you have done this.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #16 on: June 11, 2004, 04:50:32 am »

Alright, will do. Thanks for the help so far.  ;D
Logged

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #17 on: June 11, 2004, 05:08:07 am »

I can now upload pictures but it still displays this at the top....


Warning: Undefined index: SCRIPT_NAME in /www.cebus-apella.com/gallery/include/init.inc.php on line 170

Warning: Undefined index: REMOTE_ADDR in /www.cebus-apella.com/gallery/include/init.inc.php on line 177
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #18 on: June 11, 2004, 05:15:47 am »

Try changing SCRIPT_NAME to URL or PATH_INFO
Try changing REMOTE_ADDR to REMOTE_HOST

Let us know if one of those work. What type of server are you on?

-omni
Logged

dRfruitLOOP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
« Reply #19 on: June 11, 2004, 05:43:55 am »

Nothing, the two lines still show up. The server's got some version of linux on it, I can check with my host if you want more specific info than that.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.05 seconds with 19 queries.