ID:               16637
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]

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

Reply via email to