Bug #16637 Updated: Environnement variables collision

From: Date: Wed, 17 Apr 2002 09:42:49 +0000
Subject: Bug #16637 Updated: Environnement variables collision
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5177@lists.php.net to get a copy of this message
ID: 16637 Updated by: hholzgra@php.net Reported By: R.Hermann@ulg.ac.be -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux PHP Version: 4.1.2 New Comment: never trust uninitialized variables, especially not with register_globals=on in php.ini Previous Comments: ------------------------------------------------------------------------ [2002-04-16 12:22:48] R.Hermann@ulg.ac.be 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 this bug report at http://bugs.php.net/?id=16637&edit=1

« previous php.bugs (#5177) next »