Re: Register Globals Off in .htacces
| From: | Tjoumaidis | Date: | Fri, 25 Oct 2002 10:30:36 +0000 |
| Subject: | Re: Register Globals Off in .htacces | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121405@lists.php.net to get a copy of this message | ||
Thx for your reply It is working.
I also found from php.net that it's possible to set register_globals to "off" on a site-by-site basis via Apache, thus overriding the "global" setting of register_globals in php.ini:
In httpd.conf:
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot /var/www/html/mysite
php_value register_globals 0 (or 1 for "on")
</VirtualHost>
That way, sites with old code can have register globals turned on, but for all new developments it will be disabled.
Jon Haworth wrote:
Hi,I just want to know if there is a way that i can have register_globals On in my php.ini file but for some application i can turn that Off perhaps with a .htacces file.In your .htaccess: php_flag register_globals on or php_flag register_globals off Manual pages at http://www.php.net/manual/en/configuration.changes.php Cheers Jon