Saturday, January 08, 2011

PHP Bug

A new test case for testing PHP installations whether it's affected by PHP hangs on numeric value 2.2250738585072011e-308 bug is now available. Save the content of this script and run this testcase in CLI (console) by issuing php filename.php.

Here's the result in my desktop (which is affected):
willysr@desktop:~$ php test.php
Testing float behaviour. If this script hangs or terminates with an error message due to
maximum execution time limit being reached, you should update your PHP installation asap!
For more information refer to .
PHP Fatal error: Maximum execution time of 1 second exceeded in /home/willysr/test.php
on line 35

Fatal error: Maximum execution time of 1 second exceeded in /home/willysr/test.php on line 35

If you need the solution right away, you can use this patches for PHP 5.2.x and 5.3.x. It's a simple fix (only by adding volatile keyword in one line) and it should fix the problem. Rebuilt PHP and voila... you are safe from those bug. Again, thanks to PHP team who provides the quick and easy fix to solve this problem Yahoo

Here's the result when my PHP installation has been patched:
willysr@desktop:~$ php test.php
Testing float behaviour. If this script hangs or terminates with an error message due to
maximum execution time limit being reached, you should update your PHP installation asap!
For more information refer to .
Your system seems to be safe.

Update : PHP 5.3.5 and PHP 5.2.17 has been issued to fix this problem. Go get them at PHP Web Site

No comments:

Post a Comment