Enable register_globals for a single domain

How to enable register_globals for a single website without putting the entire server security at risk?
* In your file manager, enter the public_html folder.
* In the public_html folder you will see a file called .htaccess.
* Select the .htaccess file and click on edit in the upper right hand corner.
* Copy and paste the text line shown below at the bottom of .htaccess file and then save it:

php_value register_globals 1

This will turn your register_globals on and your script will work properly. Why is register_globals disabled in the first place? Leaving register_globals turned on poses a security risk for an entire web server. It should therefore only be enable on a case by case situation and only per website. Web Developers should no longer develop scripts that require register_globals to be turned on. Unfortunately this is very difficult to enforce.

If yours is off and you want to enable it use:
php_value register_globals 0
You may also want to create your own php.ini and add it to the cgi_bin. You can write a single file with the name php.ini in the root directory of your hosting account. In that file write this:
register_globals = Off
memory_limit = 120M
This also addresses the memory limit error which may hamper some installs.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.