Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   turn off register_globals on a shared server (http://www.go4expert.com/forums/registerglobals-shared-server-t397/)

Mike 27Jul2005 08:43

turn off register_globals on a shared server
 
Hello All,

My shared server provider has register_globals on. I checked by running php_info(); from within a file. I would like to turn this off, but asking them to turn it off just for me will not work.

shabbir 28Jul2005 07:57

Re: turn off register_globals on a shared server
 
register_globals server variable values cannot be set with the help of ini_set function but Entry can be set in php.ini, .htaccess or httpd.conf

So just put the following lines in .htaccess file
php_flag register_globals off
php_flag safe_mode on
Options -Indexes

But for some reason it causes 500 Error on some hosts but not all.

So the better option is to put the php.ini file in your home directory PHP always checks for php.ini in the root of the document before it
checks elsewhere.

Thanks
Shabbir Bhimani

Mike 20Sep2005 19:52

Re: turn off register_globals on a shared server
 
"So the better option is to put the php.ini file in your home directory PHP always checks for php.ini in the root of the document before it checks elsewhere. "
That will help


All times are GMT +5.5. The time now is 01:17.