Page 1 of 1

Can't pass variables anymore (Register_Globals is ON)

Posted: Wed Jan 15, 2003 3:38 am
by Matt Phelps
I've just installed php 4.1.3 ans Apache onto my WinXP home PC to use it as a development server for my website (hosted on a server also using 4.1.3) but I'm getting some odd errors. I'm sure I've just overlooked something.

I'll tell you straight off I have register_globals set to ON.

Basically my site passes variables around using the URL of the page so for example:

http://localhost/atlas/results/resultsi ... 4d1results

Where $series is a variable used in resultsindex.php to do a mySQL call.

This isn't working. The script is not seeing the $series variable. This is not a problem on my hosts server at all (using the same version of PHP). I have also found that when I'm submitting a form that the variables within the form are not being retained or passed to the script.

Am I doing something dumb here? I can't work out why this isn't quite working. Maybe something in the php.ini or Apache config I've forgotten to do?? I've searched but can't find the answer.

Posted: Wed Jan 15, 2003 4:00 am
by twigletmac
Which version of Apache are you using?

Mac

Posted: Wed Jan 15, 2003 4:02 am
by Matt Phelps
It's 1.3.27 (win32)

Posted: Wed Jan 15, 2003 4:31 am
by gite_ashish
Hi,

Check the Config file (php.ini) path in the output of phpinfo().
This is the PHP file path where you should do changes, i guess, u did changes here only... just verify it again.

phpinfo() also shows register_global value... check that also.

I can't say, above is helpful to u or not but; just a try.

Posted: Wed Jan 15, 2003 5:16 am
by Matt Phelps
Thanks. Actually that was helpful. Idiot that I am I was making changes to php.ini but had not moved the file to the windows directory. It was still in c:\php.

I only discovered that by checking phpinfo and seeing that globals were off when I knew I'd made them 'on' in php.ini.

:oops: