Active Web Hosting Logo


How To Get register_globals To Work

By default, the PHP scripting language parser is set up to not allow the use of register_globals. As a result, Active Web Hosting servers do not run with register_globals set.

You can use, for example $HTTP_SESSION_VARS to access the variables you need, as in $HTTP_SESSION_VARS[$PHP_SELF] or $HTTP_SESSION_VARS[$_POST['value']]. In fact, this is the preferred method for best security.

If you did not write the script yourself and need to install it, yet it requires register_globals set, then you'll have to create or add to an .htaccess file the following line:

<Files ".ht*">
deny from all
</Files>
php_flag register_globals on

The area in between the Files tag will ensure that people can not view your .htaccess file in a browser. The last line turns off the register_globals. Be sure to upload this file in the root directory of your CGI server for this to work.

For more information on creating, changing and uploading .htaccess files, please see our CGI .htaccess File part of our FAQ.

 


Home - Support - Management - About Us
... Active Web Hosting, 1445 American Pacific Dr. Ste 110-318, Henderson, NV 89074 ...
Toll-Free (800) 946-7764   Fax: (702) 567-1831