RE: Re: How to set register_globals=off in the script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Barnett wrote:
>> So I want to keep PHP register_globals=on in php.ini, but in local
>> files set to off?
>>
>> How I can do this?
>
> You can change this, and other php.ini directives, with the PHP
> function ini_set

register_globals cannot be changed with ini_set().  It is of type "PHP_INI_PERDIR"
meaning that it can only be changed in the php.ini, .htaccess, or httpd.conf.  See:

http://www.php.net/manual/en/function.ini-set.php

Personally I prefer to set register_globals=off in php.ini, then use an .htaccess
file to turn it on only for those applications that absolutely require it to
function.  That way new applications default to register_globals=off.  IOW, I prefer
to have to take specific action to open up potential security holes rather than
having to take specific action to close them.  YMMV...

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux