ID:               19761
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Linux Redhat 7.3
 PHP Version:      4CVS-2002-10-04
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:
------------------------------------------------------------------------

[2002-10-04 16:03:03] [EMAIL PROTECTED]

Problem find by [EMAIL PROTECTED] 
When run this script everything goes fine until we reach number
2147483647. In php 4.0.4, it turns the number negative. In latest CVS,
it stop add value to the number.

There is the script! To recriate the problem, put the 2147483640 value
in stats.txt and refresh the page many times. The number do not pass
2147483648.

Here's the script.

<?
$counter_file = "stats.txt";
$fp = fopen($counter_file, "r");
$counter = (int)fread($fp, 24);
$close = fclose($fp);

if (!isset($hits)) {
   $counter++;
   setcookie("hits","1");
} else {
   $counter++;
   setcookie("hits","$counter");
}
 
$fp = fopen($counter_file , "w");
fwrite($fp, $counter);
fclose($fp);

print "Number: $counter";           
?>

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19761&edit=1

Reply via email to