rockinthesixstring Posted June 9, 2008 Share Posted June 9, 2008 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? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 9, 2008 Share Posted June 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 9, 2008 Share Posted June 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
rockinthesixstring Posted June 9, 2008 Author Share Posted June 9, 2008 1) I don't know what software is being run, but my client says they HAVE to be able to run it. It is not "my" server so I will simply give them what they want (though I have voiced the same concerns). 2) I have restarted IIS with no luck...does the server have to be rebooted? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 9, 2008 Share Posted June 9, 2008 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.) Quote Link to comment Share on other sites More sharing options...
rockinthesixstring Posted June 9, 2008 Author Share Posted June 9, 2008 So because I have both PHP4 and PHP5 running on the same box... how do I tell PHP4 to use C:\PHP4\php.ini and tell PHP5 to use C:\PHP5\php.ini? as it sits, it seems as though PHP4 is using the same php.ini as php5. Thanks again for the help!!! Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 9, 2008 Share Posted June 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
rockinthesixstring Posted June 9, 2008 Author Share Posted June 9, 2008 As I said, I am simply providing a hosting service to someone who is developing their own code. I have no access to their code and they are unwilling to change it... they are simply paying me to make sure that their bad code will run on their server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.