Forum Moderators: coopster

Message Too Old, No Replies

Undefined variables, GET not giving variables across pages

PHP5 - works on PHP4 - what is different?

         

badbadmonkey

5:12 am on Jun 30, 2008 (gmt 0)

10+ Year Member



Notice: Undefined index: HTTP_CLIENT_IP

and a bunch of similar errors - including the three GET variables I use on a "main.php" to decide which page to display.

I can make the errors go away by playing with error_reporting in php.ini, but that does't help - when I navigate to main.php?var1=x&var2=y&var3=z, var1 etc remain undefined.

PHP 5
on IIS7
on Vista 64

The site works fine on
a) my old PHP 4 development set-up
b) live server on PHP 5

Possibly relevent entries in php.ini:

variables_order = "EGPCS" 
register_globals = Off
register_long_arrays = On
register_argc_argv = On
auto_globals_jit = Off

Any ideas?

daveVk

6:47 am on Jun 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



think it is to do with register_globals [au2.php.net...]

badbadmonkey

7:11 am on Jun 30, 2008 (gmt 0)

10+ Year Member



Nope, register_globals was/is off on both the other servers on which this site has been running fine for years.

Besides, turning it on makes no difference. Not that it should. The code I'm using to GET the variables is:

$section = $_GET['section']; 
$chapter = $_GET['chapter'];
$page = $_GET['page'];

By the way, I just changed a number of the above php.ini settings to come into line with the live server, but none of them make any difference.

RonPK

8:10 pm on Jun 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



when I navigate to main.php?var1=x&var2=y&var3=z, var1 etc remain undefined

Do they show up in print_r($_GET)?