• PHP
  • Ruby on Rails
  • MySQL
  • Linux
    • SELINUX
    • Fedora
    • debian
  • Apache
  • nginx
  • AJAX
Albertech.net

PHP Floating Point Bug Crashes 32-bit Servers

January 5, 2011 5:25 pm / Albertech.net

There is currently a bug in PHP 5.2/5.3 for certain numbers to take up all system resources in a 32-bit system using the x87 instruction set (Most Intel/AMD boxes use this instruction set).  Systems running 64-bit operating systems are not affected by this bug.

You can test whether your Linux system is running 64-bit by typing the following command in a shell window:
uname -m

If you see i386 or i686, you are running a 32-bit machine. Listings with x86_64, or amd64 denote a 64-bit machine.

I’m still waiting for this patch to appear in an upcoming operating system update for Debian/Ubuntu/Red Hat/etc. For an immediate fix, a PHP patch is available.

UPDATE: I’ve tested 32-bit Debian systems running PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 and have not been able to reproduce this problem. Seems as though it affects certain versions of PHP 5 on 32-bit systems.

If you are unable to apply the PHP patch, there is a quick workaround posted on http://www.aircraft24.com/en/info/php-float-dos-quickfix.htm.

For more information:
Source:

http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/

Reddit:
http://www.reddit.com/r/programming/comments/evtrq/php_hangs_on_numeric_value_22250738585072011e308/

PHP Bug Report:
http://bugs.php.net/bug.php?id=53632

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: PHP

One Thought on “PHP Floating Point Bug Crashes 32-bit Servers”

  1. Montreal Web Design on January 10, 2011 at 5:48 am said:

    Excellent analysis of this bug
    http://news.ycombinator.com/item?id=2066084

Post Navigation

← Previous Post
Next Post →

Categories

  • AJAX
  • Android
  • Apache
  • Canon Cameras
  • Cloud
  • CMS
  • Computer Mods
  • Conferences
  • Deals
  • debian
  • Fedora
  • Flash
  • Frameworks
  • git
  • Hardware
  • HTML
  • IDE
  • iPhone
  • iPhone App Review
  • jQuery
  • Linux
  • Mac OS X
  • MySQL
  • nginx
  • PHP
  • portfolio
  • Puppet
  • Ruby on Rails
  • Script Reviews
  • SELINUX
  • Software
  • Software Review
  • SQL Server
  • statistics
  • Tech
  • Tomcat
  • Uncategorized
  • VMWARE
  • VPS
  • Windows
  • wordpress
  • Zend Framework

Blogroll

  • DragonAl Flickr
  • Dropbox – Free 2GB Account
  • James' Blog
  • Javascript Compressor
  • PHP Builder Community
  • PHP-Princess.net
  • Rubular – Regular Expression Validator
  • The Scale-Out Blog
  • Tiny MCE

Tags

activation AJAX android antec Apache AWS awstats canon coda codeigniter debian enclosure external free G1 install vmware tools Internet Explorer iphone 5 jquery Linux mx-1 MySQL office 2007 OSX photoshop PHP plugin plugins portfolio redesigned website review rewrite script security SELinux ssh tinymce tutorial upgrade VMWARE vmware server wordpress wordpress mu XSS zend framework
© Copyright 2013 Albertech.net
Infinity Theme by DesignCoral / WordPress
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.