ID: 38168 User updated by: php at unfit dot org Reported By: php at unfit dot org Status: Open Bug Type: PDO related Operating System: Gentoo Linux PHP Version: 5.1.4 New Comment:
I tried the php version from cvs and it seems to fix the test I provided. However, if I remove '$err = $query->errorCode();' from the test case, it will core dump again, though the execution still appears to complete. Previous Comments: ------------------------------------------------------------------------ [2006-07-23 17:42:54] php at unfit dot org I tried the php version from cvs and it seems to fix the test gave I provided. However, if I remove '$err = $query->errorCode();' from the test case, it will core dump again, though the execution still appears to complete. ------------------------------------------------------------------------ [2006-07-23 07:11:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip ------------------------------------------------------------------------ [2006-07-20 21:35:46] php at unfit dot org Description: ------------ Core dump on PDO error. PDO error code if checked before execute is 'HY093'. Reproduce code: --------------- <?php //use actual database, user and password where applicable $dbh = new PDO('pgsql:host=127.0.0.1;dbname=foo', 'foo', 'foo'); $query = $dbh->prepare('INSERT INTO table (varA, varB, varC) VALUES ( :varA, :varB, :varC );'); $query->bindValue(':foo', 'foo'); $query->bindValue(':varC', 'foo'); $err = $query->errorCode(); echo "$err\n"; echo "you will see this.\n"; flush(); $query->execute(); /* CRASH POINT You will see only output that has been flushed. If running on the command line you will also see something like this: *** glibc detected *** malloc(): memory corruption: 0x16987018 *** Aborted (core dumped) */ echo "you won't see this.\n"; flush(); ?> Expected result: ---------------- HY093 you will see this. you won't see this. Actual result: -------------- HY093 you will see this. *** glibc detected *** malloc(): memory corruption: 0x16987018 *** Aborted (core dumped) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38168&edit=1