How to Turn register_globals Off
April 3rd, 2006For those of you trying to install Gallery 2 onto your webserver to display your photo albums, Gallery will complain if a certain PHP variable, — named
register_global
— is not disabled, for security reasons. When I encountered this, I was about to email my web hoster to ask them to disable it, but then I found out how to do it myself. Here are two options:
I have to give credit to this site for telling me how:
1) You can turn off register_globals on your account. Create a file named php.ini that includes this line:
register_globals = Off
and dump it into your root folder
2) If that doesn’t work, try the .htaccess way. Simply add this line to your .htaccess (create the file if it doesn’t exist):
php_flag register_globals off
Which method works depends on how your host sets it.