note 22310 added to security.registerglobals
| From: | gemert at neroc dot nl | Date: | Thu, 13 Jun 2002 14:21:24 +0000 |
| Subject: | note 22310 added to security.registerglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31801@lists.php.net to get a copy of this message | ||
foreach ($GLOBALS AS $key=>$val)
{
eval("\$$key = '$val';");
}
Does the trick but it also genrates an error. It's better to use the following:
foreach ($GLOBALS AS $key => $val)
{
if ($key != "GLOBALS") {eval("\$$key = '$val';");}
}
Now the problem is realy solved, ofcourse it's best to use the new standard and only get the
vars you need. So you have to rewrite your .php pages. In the mean time this is a workaround.
--
http://www.php.net/manual/en/security.registerglobals.php
http://master.php.net/manage/user-notes.php?action=edit+22310
http://master.php.net/manage/user-notes.php?action=delete+22310
http://master.php.net/manage/user-notes.php?action=reject+22310