This is a bug in php’s mysql interface (see https://bugs.php.net/bug.php?id=31288). I just tracked it down and reported it to Zend. If you build your own PHP from source, the workaround is to comment out line 2250 of ext/mysql/php_mysql.c (in version 5.0.3) and rebuild (it crashes because this line ‘s referencing a pointer that hasn’t been set).