From: bugs at jth dot net Operating system: Linux Fedora 3 PHP version: 5.1.0 PHP Bug Type: Reproducible crash Bug description: PDO::query is not returning a PDOStatement object
Description: ------------ PDO::query is not returning a PDOStatement object. and segmentation fault using array(PDO::ATTR_PERSISTENT => true) mysqld Ver 5.0.15-standard for pc-linux-gnu on i686 Server version: Apache/2.0.54 Architecture: 32-bit Reproduce code: --------------- try { $dbh = new PDO('mysql:host=localhost;dbname=ddddd', "xxxxx", "xxxxxxx"); $query = "SELECT COUNT(*) FROM ordrer"; $stmt = $dbh->query($query); //$stmt = $dbh->prepare($query); $result = $stmt->execute(); print $stmt->columnCount(); } catch (PDOException $e) { print "Error !: " . $e->getMessage() . "<br/>"; die(); } Actual result: -------------- $stmt = $dbh->query($query); Call to a member function columnCount() on a non-object when executing code print $stmt->columnCount() but not after $stmt = $dbh->prepare($query); $result = $stmt->execute(); However, Apache2 child pid 22634 exit signal Segmentation fault (11) in any case when using array(PDO::ATTR_PERSISTENT => true) -- Edit bug report at http://bugs.php.net/?id=35435&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35435&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35435&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35435&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35435&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35435&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35435&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35435&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35435&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35435&r=support Expected behavior: http://bugs.php.net/fix.php?id=35435&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35435&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35435&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35435&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35435&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35435&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35435&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35435&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35435&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35435&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35435&r=mysqlcfg