note 21817 added to security.registerglobals
| From: | bernard@php.net | Date: | Tue, 28 May 2002 14:06:05 +0000 |
| Subject: | note 21817 added to security.registerglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31095@lists.php.net to get a copy of this message | ||
If you have a server where php.ini is not under your control, which has upgraded to PHP 4.2 with
register_globals turned off, you have to alter all of your scripts that use automatically registered
global variables to work with the new setup.
This can take time, and if you need an instant fix to make your old code work, insert the following
code at the top of every file. This registers all globals, giving you time to work on a subtler fix,
without all your scripts being broken in the meantime.
foreach ($GLOBALS AS $key=>$val) {
eval("\$$key = '$val';");
}
In the long run however, you really should fix your scripts to work with the new system
Bernie :o)
--
http://www.php.net/manual/en/security.registerglobals.php
http://master.php.net/manage/user-notes.php?action=edit+21817
http://master.php.net/manage/user-notes.php?action=delete+21817
http://master.php.net/manage/user-notes.php?action=reject+21817