Jump to content

Register_Globals = On [not working]


Recommended Posts

Hello PHP gurus.

I have just installed PHP4 for a client who needs it for their application.  When we navigate to their site we get the following error...

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

I have set the "register_globals = on" in the php.ini folder, but when I run phpinfo() it still says it is off...

 

Why could this be?

Link to comment
Share on other sites

Have you restarted the server? When making any changes to the php.ini the server will need to be restarted.

 

Also why does register_globals need to be enabled? Also another thing PHP4 is also at the end of its life.

 

I suggest you to use PHP5 instead and to not use register_globals. If its a PHP script you're installing then either see if a more update version exists or find a different script which does not rely on register globals.

Link to comment
Share on other sites

Edit: Basically says the same as above ^^^

 

Your immediate problem is you need to stop and start the web server to get changes made to php.ini to take effect.

 

Your long term problems are that support for php4 ended a while ago and that register_globals have been completely eliminated in upcoming php6. Turning register_globals on to get a script to work now is a short term solution as the script itself will need to be eventually fixed so that it will work under current and future versions of php.

Link to comment
Share on other sites

For IIS, you have to stop the IIS service (in the services control panel). Just stopping and starting the web site in the IIS management console is not enough to get the php.ini to be processed.

 

Also make sure that the php.ini that you are changing is the one that php is using (make a file with a phpinfo(); statement in it and browse to it.)

Link to comment
Share on other sites

There are very few cases where code that works under php4 won't work as is under php5 - http://www.php.net/manual/en/migration5.incompatible.php

 

In almost all cases, it is php.ini configuration differences that will prevent code from working when it is moved to a different server/php version.

 

Your time would be better spent testing the script under php5 and fix those things that it is dependent on that are depreciated and turned off by default or eliminated in current and future php versions.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.