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? Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/ Share on other sites More sharing options...
genericnumber1 Posted April 29, 2007 Share Posted April 29, 2007 http://php.net/register_globals Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-240793 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? Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-240801 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; Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-240840 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? Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-241137 Share on other sites More sharing options...
per1os Posted April 29, 2007 Share Posted April 29, 2007 www.php.net/ini_set Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-241152 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 Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-241441 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 Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-241491 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." Link to comment https://forums.phpfreaks.com/topic/49148-solved-normal-variables-acting-like-get-variables/#findComment-242061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.