Forum Moderators: coopster

Message Too Old, No Replies

Setting register global Off runtime.

Is it possible?

         

smagdy

9:45 pm on Apr 22, 2007 (gmt 0)

10+ Year Member



Hello,

Is it possible to set the register_global to Off in the begining of the PHP file?

I know it can be set in php.ini or .htacess

Thanks in advance

jatar_k

11:38 pm on Apr 22, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



[ca3.php.net...]
Please note that register_globals cannot be set at runtime (ini_set()). Although, you can use .htaccess if your host allows it as described above.

smagdy

3:43 pm on Apr 23, 2007 (gmt 0)

10+ Year Member



Thanks, i have another related question...

Lets say register_global is Off in php.ini, can i make it On in .htaccess for just a specific file? though there are other files in same folder that need register_global to be Off.

Thanks in advance

jatar_k

3:46 pm on Apr 23, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it is PHP_INI_PERDIR which means it can be set per directory but I do not believe you can set it for a specific file, unless that is the only file in that directory