php register globals on/off through .htaccess

25.5k Views Asked by At

I have 2 scritpts on 2 different folders. One on them need the register globals to On and the other to Off.

Is it possible to enable regsiter globals on one folder and disable it on another one ? (maybe with a .htaccess ?)

regards

2

There are 2 best solutions below

0
knittl On BEST ANSWER

if your apache instance allows you to override flags through .htaccess you can put the following in your file:

php_flag register_globals off
0
Vinicius On

I have a login script that works like this: User type username and pass, if ok then save user data in a session and redirect to restrict area. I hosted my site in bluehost.com and it works perfectly. So for some reasons I've decided to change to hostgator.com and session stopped save data from user. All I have to do is add to php.ini a line to disable register_globals

register_globals=Off