From:             [EMAIL PROTECTED]
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

Reply via email to