• 1-888-289-2246
  • 24x7x365 Presence

How to turn off Register globals for your website hosted on a Linux server


Many times, it is necessary to turn off/disable Register globals for your site. You can turn off Register globals through the .htaccess file. So below are the steps to turn it off :-

Step 1: Create a .htaccess file under your domain or on your local computer and then upload it under the domain.
Step 2: Use the php directive below to turn Register globals off :-

php_flag register_globals off

Step 3: Make sure that the file is saved as .htaccess not .htaccess.txt, because htaccess is itself the extension of the file.

It’s done! To check if Register globals has been turned off or not, just create an empty xyz.php file anywhere on your web root under the domain and write the following line:

                        phpinfo();
            ?>

Open this file in any web browser using http://domain/xyz.php and check out the value for register_globals on the page.

]]>


Leave a Reply

Your email address will not be published. Required fields are marked *