register_globals is being stubborn

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
jtfish
Forum Newbie
Posts: 2
Joined: Tue Nov 30, 2004 3:26 pm
Location: My office. Always.

register_globals is being stubborn

Post by jtfish »

Hello,

I've been wrestling with a couple apache/php installations on a couple of linux boxes and have been consistently running in to the same odd problem. I'm sure it's some ridiculous detail that is entirely my fault for tinkering with, but if someone could point me at some common pitfalls I'd appreciate it.

Ok, so the problem...

I can't convince register_globals to turn on. Please don't start out all replies by telling me how insecure it is to have it on

At any rate, I've tried turning it on in the php.ini file, I've tried using the .htaccess file, and since I'm configuring for an installation of gforge, adding ini_set("register_globals", "1"); in every .php file will probably drive me insane. Anyone have any suggestions or things I've missed?

I've been using phpinfo() to check the configuration of things, and so far only adding the ini_set calls has actually changed the "Local Value" of register_globals. the "Master Value" seems to correspond to my php.ini file.

Thanks greatly for any information anyone can share.

-Jeff
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Have you restarted the server?
jtfish
Forum Newbie
Posts: 2
Joined: Tue Nov 30, 2004 3:26 pm
Location: My office. Always.

Post by jtfish »

Phenom wrote:Have you restarted the server?
Is there a command to restart the php server? I've restarted the web server a number of times during these experiments, but if there's some way to restart php aside from recompiling libphp4.so, I don't know what it is.

I'm kindof new to this ;)
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

reboot
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

Confirm the location of your php.ini file and make sure the one you are changing is the one PHP is using.

You should be able to check the location of the php.ini file that php is using by looking at the out put from phpinfo
Post Reply