lalabored Posted April 29, 2007 Share Posted April 29, 2007 On my site, normal variables act like get variables. For example if I had $hi = 1, people could change $hi to 2 with index.php?hi=2. Normally index.php?hi=2 would only change $_GET['hi'] to 2. How do I stop this from happening? Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted April 29, 2007 Share Posted April 29, 2007 http://php.net/register_globals Quote Link to comment Share on other sites More sharing options...
lalabored Posted April 29, 2007 Author Share Posted April 29, 2007 So how do I turn register_globals off? Quote Link to comment Share on other sites More sharing options...
gsquare567 Posted April 29, 2007 Share Posted April 29, 2007 in php.ini search for register_variables and make it = off; Quote Link to comment Share on other sites More sharing options...
lalabored Posted April 29, 2007 Author Share Posted April 29, 2007 I don't have access to the php.ini file, is there any other way of turning this off? Quote Link to comment Share on other sites More sharing options...
per1os Posted April 29, 2007 Share Posted April 29, 2007 www.php.net/ini_set Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted April 30, 2007 Share Posted April 30, 2007 you can't set register_globals via ini_set, use .htaccess Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 30, 2007 Share Posted April 30, 2007 you can't set register_globals via ini_set, use .htaccess You sure it can't be set with ini_set? It's in the list ->http://ca.php.net/manual/en/ini.php#ini.list Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted May 1, 2007 Share Posted May 1, 2007 http://ca.php.net/manual/en/ini.core.php#ini.register-globals "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. An example .htaccess entry: php_flag register_globals off." Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.