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



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to