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]   Go Down

Author Topic: Undefined index errors ???  (Read 5144 times)

0 Members and 1 Guest are viewing this topic.

Tallman027

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Undefined index errors ???
« on: November 07, 2003, 06:29:03 pm »

Hi all,
First of all the best gallery ever !!!

However theres one little thing I'm having trouble with.......
On every page I get the following errors, even though the gallery seems to work perfectly............any ideas ?

Warning: Undefined index: SCRIPT_NAME in /www.shorehambysea.com/coppermine/include/init.inc.php on line 91

Warning: Undefined index: REMOTE_ADDR in /www.shorehambysea.com/coppermine/include/init.inc.php on line 98

If anyone would like a closer look please go to
http://www.shorehambysea.com/coppermine and let me know what you think...........

Many thanks,

Tallman027
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Undefined index errors ???
« Reply #1 on: November 08, 2003, 11:54:31 am »

seems like the version of php running on your server doesn't support the env vars needed. Edit init.inc.php and replace $SCRIPT_NAME and $REMOTE_ADDR with the env vars that are supported on your server (probably $_SERVER["SCRIPT_NAME"] and $_SERVER["REMOTE_ADDR"]) - see your phpinfo() to check what server vars are supported.

GauGau
Logged

Tallman027

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Undefined Index stuff !
« Reply #2 on: November 08, 2003, 01:34:34 pm »

Many thanks for the reply.

I did as you advised and checked my phpinfo(). I found the following:

_ENV["SCRIPT_NAME"]           =          /fcgi-bin/php  (not inc "=")
_ENV["REMOTE_ADDR"]          =           81.128.16.116  (not inc "=")

So it looks as if its supported. I'm running PHP 4.1.2 by the way.

Any further ideas or advise on exactly how I change the inti.inc.php - I'm kind of a newbie at PhP so please be gentle with me !!!

Many thanks
Tallman027
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

Tallman027

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Undefined Script Error
« Reply #4 on: November 08, 2003, 06:11:33 pm »

Gaugau,
Many thanks that fixed the SCRIPT_NAME issue however I still have the REMOTE_ADDR problem at the top of the page.

Sorry to bother you yet again, however if you have any further excellent advise, it would be much appreciated.

Cheers !
Tallman027
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Undefined index errors ???
« Reply #5 on: November 09, 2003, 09:14:01 am »

try replacing
Code: [Select]
$raw_ip = stripslashes($HTTP_SERVER_VARS['REMOTE_ADDR']);with
Code: [Select]
$raw_ip = stripslashes($_SERVER["REMOTE_ADDR"]);or
Code: [Select]
$raw_ip = stripslashes($_ENV["REMOTE_ADDR"]);
If this doesn't work for you, just comment line 98 out (you'll only lose the banning feature):
Code: [Select]
// $raw_ip = stripslashes($HTTP_SERVER_VARS['REMOTE_ADDR']);GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 18 queries.