En/Disable PHP register_globals

In: Web

1 Jun 2009

You can learn more on what register globals is by using the link http://us2.php.net/register_globals

For those wishing to turn on or turn off PHP register_globals, you can edit files within your account to set this setting locally. Depending on if the machine you are on is using PHPSUEXEC or not will determine which method you use.

For NON-PHPsuexec servers:

  1. Using a file manager from cPanel or FTP: locate the “.htaccess” file located in each directory *NOTE* If you want this setting for your entire site, edit the .htaccess in public_html if not, edit the .htaccess file within the folder you want it for.
  2. Once you have this file opened with an editor, add the below line onto a new line in the file: php_flag register_globals off (Change it to On to turn it on)
  3. Save the file, and your done!

For PHPsuexec servers:

  1. Using a file manager from cPanel or FTP: Create a file named “php.ini” in the directory of your choice or in “public_html” for your entire site.
  2. Now open it with a text editor and add the following line: register_globals = Off (Change to On if you want this enabled)
  3. Now save the file, and your done!

This process can be followed for many other similar php settings. Bear in mind that for a phpsuexec file, a local php.ini file only affects the directory that it’s directly put in. Subdirectories are not affected.

Comment Form

About this blog

This blog is made by Muhammad Baiquni, dedicated to give all of you information about Computer, Security, Ebook reviews, Software, Tutorial, Web: HTML, PHP, MySQL, CSS, and more of million information.

If you like, please bookmark this web or feed us for be the first one get our newest information.

Photostream

    bari - giubin.comNerd EquipmentHard disk - WD 10000 - giubin.com - Barlettamacwindows 7 & Mac OS X ssh ♥

Categories

    make money with your web site