Bug #16637: Environnement variables collision
| From: | R dot Hermann at ulg dot ac dot be | Date: | Tue, 16 Apr 2002 16:22:52 +0000 |
| Subject: | Bug #16637: Environnement variables collision | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-5114@lists.php.net to get a copy of this message | ||
From: R.Hermann@ulg.ac.be
Operating system: Linux
PHP version: 4.1.2
PHP Bug Type: *General Issues
Bug description: Environnement variables collision
Hello,
After updating to MDK 8.2 - PHP 4.1.2. I encoutered serious troubles with
my php website. I managed to solve it and relate it to an environnemental
variable problem.
This script :
<?
echo $out."<BR>";
$c=1;
$out[$c]=153.2;
echo $out[$c]."<BR>";
$den[$c]=153.2;
echo $den[$c]."<BR>";
phpinfo();
?>
Gives the following output :
/dev/vc/
1
153.2
This may be a problem, since a lot of new variables have been defined
which have lower case names and are quite common ( examples : $out,$res,
...). Furthermore, the content of an array having the same name as
predefined variables seems to be seriously affected.
We found that defining the array with
$out=array();
helps fixing the problem.
I thought you might be interested.
Best wishes,
Raphael
--
Edit bug report at http://bugs.php.net/?id=16637&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16637&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16637&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16637&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16637&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16637&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16637&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16637&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16637&r=submittedtwice