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
your server seems to be set up improperly. Try silly_safe_mode (refer to documentation (http://coppermine.sourceforge.net/manual.php#safe)).
GauGau
Thanks very much for the tip. Unfortunatly, adding that line like it said to do did nothing. Any other thoughts?
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
It would appear that I have both of those.
Provide a link, please.
http://www.cebus-apella.com/gallery/
Activate debug mode.
Done
Post lines 80 through 110 of your init.inc.php file.
}
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']);
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 $
// $Id: init.inc.php,v 1.27 2004/03/31 04:55:05 hyperion01 Exp $
Which package did you download?
cpg1.3.0beta4
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.
Alright, will do. Thanks for the help so far. ;D
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
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
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.
Omni's looking for the server software name, too. i.e. Apache, ServerofDeath, etc.
Oh ok, it's Apache as far as I know.
Try changing HTTP_SERVER_VARS to _SERVER or _ENV
(although I doubt this will change anything, but it's worth a shot)
-omni
What is the PHP version number?
Quote from: omniscientdeveloper on June 11, 2004, 05:59:05 AM
Try changing HTTP_SERVER_VARS to _SERVER or _ENV
(although I doubt this will change anything, but it's worth a shot)
-omni
Using _ENV worked, thanks very much everybody.
which php version are you running?
4.1.2
Good to hear that the problem is solved. For our reference, could you look in your phpinfo and tell us what the 'variables_order' setting is? It should be a sequnce of letters.
Just says "no value" in both columns.
Thanks again for all the help
-Garrett
version: 4.3.6
mine says: variables_order = "EGPCS"
Yes, this string activates or deactivates the various global variable types. If I wanted to turn off $_ENV variables for my users, I would set it to GPCS. In this case, PHP must be resorting to undocumented default settings for these variables since no directive is available in php.ini.