note 27183 added to configuration.directives
| From: | ianyates at rack1 dot php dot net | Date: | Tue, 26 Nov 2002 11:26:20 +0000 |
| Subject: | note 27183 added to configuration.directives | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39990@lists.php.net to get a copy of this message | ||
Turning 'register_globals' off.
It probably is somewhere in this manual... but I couldn't find it.
Basically, you can't use ini_set() once you're in your PHP file because the globals have
already been registered.
One solution I was forced to implement was a loop through all variables to unset everything except
for the super arrays.
Ideally you need .htaccess abilities (check with your host) and use the lines below:
<IfModule mod_php4.c>
php_value register_globals "no"
</IfModule>
You can change any (as far as I know) PHP configuration variable using this.
Much easier than ini_set() in my humble opinion.
Hope it helps someone
--
http://www.php.net/manual/en/configuration.directives.php
http://master.php.net/manage/user-notes.php?action=edit+27183
http://master.php.net/manage/user-notes.php?action=delete+27183
http://master.php.net/manage/user-notes.php?action=reject+27183