Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Changing Register Globals and other PHP directives

register_globals is the one PHP directive that absolutely must be switched off on your server.


If it is on, it is first of all a general security liability, and second, it can cause a number of problems with software coded for register_globals off --- such as the all the odd issues that arose after the recent security patch. Please turn register_globals off in your php.ini file, or ask your host to do it.


You should not use software that requires you to keep register_globals on. It has been deprecated since PHP 5.3.0, and will be entirely removed in PHP 6.0.0. To know if register_globals is on on your server, download the phpinfo script and upload it to your server, then open it in your browser and search for register_globals in the output; it will be "On" or "Off". If it's on, do whatever it takes to turn it off.


This is how you verify whether it's on or off:

It is best to turn this directive off in your actual php.ini file. If you cannot do that, you can add the following directive into your .htaccess file:

php_flag register_globals off

Depending on your host, the following may also work / be the preferred directive:

php_value register_globals 0

You may also be able to upload a php.ini file with the right directive into your root public_html folder --- but not all hosts support either of these overrides.


If you or your hosting provider are unable to turn register_globals off, you can fix the issue by sticking any one of the alternative solutions at PHP.Net (linked above) into the beginning of your index.php file --- right after session_start(). (This is not officially supported however.)

 

Comments

Log in to post Comments! Click to login
 

Troubleshooting

Add to Favorites
Tutorials dealing with problem situations.
 

Categories

 

Content Index

Index for 2012
[[CLICK_OPEN]] February
[[CLICK_OPEN]] January
Index for 2011
[[CLICK_OPEN]] December
[[CLICK_OPEN]] November
[[CLICK_OPEN]] October
[[CLICK_OPEN]] September
[[CLICK_OPEN]] August
[[CLICK_OPEN]] July
[[CLICK_OPEN]] June
[[CLICK_OPEN]] May
[[CLICK_OPEN]] April
[[CLICK_OPEN]] March
[[CLICK_OPEN]] February
[[CLICK_OPEN]] January
Index for 2010
[[CLICK_OPEN]] December
[[CLICK_OPEN]] November
[[CLICK_OPEN]] October
[[CLICK_OPEN]] September
[[CLICK_OPEN]] August
[[CLICK_OPEN]] July
[[CLICK_OPEN]] June
[[CLICK_OPEN]] May
[[CLICK_OPEN]] April
[[CLICK_OPEN]] March
[[CLICK_OPEN]] February
[[CLICK_OPEN]] January
Index for 2009
[[CLICK_OPEN]] December
[[CLICK_OPEN]] November
[[CLICK_OPEN]] October
[[CLICK_OPEN]] September
[[CLICK_OPEN]] August
 
Questions? Ask us!
Back to Top