Can't pass variables anymore (Register_Globals is ON)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Matt Phelps
Forum Commoner
Posts: 82
Joined: Fri Jun 14, 2002 2:05 pm

Can't pass variables anymore (Register_Globals is ON)

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Which version of Apache are you using?

Mac
Matt Phelps
Forum Commoner
Posts: 82
Joined: Fri Jun 14, 2002 2:05 pm

Post by Matt Phelps »

It's 1.3.27 (win32)
User avatar
gite_ashish
Forum Contributor
Posts: 118
Joined: Sat Aug 31, 2002 11:38 am
Location: India

Post 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.
Matt Phelps
Forum Commoner
Posts: 82
Joined: Fri Jun 14, 2002 2:05 pm

Post 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:
Post Reply