Php register globals enable / disable via .htaccess

I have 2 scritpts in 2 different folders. One of them needs register global values ​​to be On, and the other to Off.

Is it possible to include regsiter global variables in one folder and disable them on another? (possibly with .htaccess?)

considers

+4
source share
2 answers

if your apache instance allows you to override flags with .htaccess , you can put the following into your file:

 php_flag register_globals off 
+8
source

I have a login script that works as follows: Enter the username and password, if ok then save the user data in the session and redirect to the area restriction. I posted my site on bluehost.com and it works great. Therefore, for some reason, I decided to switch to hostgator.com, and the session stopped saving data from the user. All I need to do is add a line in php.ini to disable register_globals

 register_globals=Off 
0
source

All Articles