[Solved]: Undefined Index: SCRIPT_NAME, REMOTE_ADDR [Solved]: Undefined Index: SCRIPT_NAME, REMOTE_ADDR
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: Undefined Index: SCRIPT_NAME, REMOTE_ADDR

Started by dRfruitLOOP, June 10, 2004, 11:22:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dRfruitLOOP

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

Joachim Müller

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

GauGau

dRfruitLOOP

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

Joachim Müller

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

dRfruitLOOP

It would appear that I have both of those.

hyperion

&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)


hyperion

&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)


hyperion

Post lines 80 through 110 of your init.inc.php file.
&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

}

    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']);

hyperion

Post the ID line from the beginning of the file. 

It should look something like this:


$Id: init.inc.php,v 1.33 2004/06/04 17:16:34 datajack Exp $
&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

// $Id: init.inc.php,v 1.27 2004/03/31 04:55:05 hyperion01 Exp $

hyperion

&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP


hyperion

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.
&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

dRfruitLOOP

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

dRfruitLOOP

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

omniscientdeveloper

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

dRfruitLOOP

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.