From: asylow at free dot fr Operating system: Windows XP SP3 PHP version: 5.2.6 PHP Bug Type: PDO related Bug description: PDO execute causes apache.exe to crash
Description: ------------ Hi, I get an apache crash when executing the "execute" on a prepared query. "L'instruction à "0x0096ac76" emploie l'adresse mémoire "0X07a0a410". La mémoire ne peut pas être "read" PHP 5.2.6 Apache 2.2.9 The problem also happened using Aug 06, 2008 04:30 UTC Snapshot. Reproduce code: --------------- The minimal code that causes the crash is : <?php class myclass { function __construct() { $this->db = new PDO ("mssql:host=localhost\SQLEXPRESS;dbname=test","sa","toto"); } function foo() { $sql = 'SELECT oidObject FROM otIncidentspec WHERE oidObject=:ndossier AND oidArticle=277247835'; $sth_activiteincident = $this->db->prepare($sql); $extract[] = array("abc"=>29); $extract[] = array("def"=>20); $sth_activiteincident->execute(array(':ndossier'=>277248289)); $sth_activiteincident->execute(array(':ndossier'=>277248290)); } } $erp = new myclass(); $erp->foo(); ?> Actual result: -------------- Strangely minimal changes to the code avoids the problem. ie : removing the $extract[] definitions OR removing "AND oidArticle=277247835" in the query OR defining $this->db in the foo function instead of in the __construct. I made a backtrace : PHP5TS! 0096ac76() PHP5TS! 0096bd79() php_pdo_stmt_delref(_pdo_stmt_t * 0x064621c8, void * * * 0x01e67d18) line 2426 + 13 bytes pdo_dbstmt_free_storage(_pdo_stmt_t * 0x064621c8, void * * * 0x01e67d18) line 2432 + 13 bytes PHP5TS! 00a0cb9f() PHP5TS! 00a0ca59() Thank you. -- Edit bug report at http://bugs.php.net/?id=46289&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46289&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46289&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46289&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46289&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46289&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46289&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46289&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46289&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46289&r=support Expected behavior: http://bugs.php.net/fix.php?id=46289&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46289&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46289&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46289&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46289&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46289&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46289&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46289&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46289&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46289&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46289&r=mysqlcfg