ID: 35592 Updated by: [EMAIL PROTECTED] Reported By: mrethers at ebcubes dot com Status: Feedback Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.1.1 Assigned To: wez New Comment:
Additional test: On a system with Windows XP SP2, DB2 Run-Time Client Lite Version 8 FixPak 10, odbc32.dll version 3.525.1117.0, connecting to a DB2 database, I still get a crash. So much for the odbc32.dll theory... Here's the backtrace using php-5.1-win32-200512180730: 0:000> kv ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 0012f8c8 74327f94 00000000 10008ec0 00abce70 ODBC32!MpHeapAlloc+0x435 0012f8e8 7434350b 003b1db0 00000001 000003ee ODBC32!SQLDisconnect+0x147 *** WARNING: Unable to verify checksum for C:\Programs\php5.1-snap\ext\php_pdo_odbc.dll *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Programs\php5.1-snap\ext\php_pdo_odbc.dll - 0012f904 00391c75 00000003 74350000 1009a470 ODBC32!SQLFreeHandle+0x1f3 00000000 00000000 00000000 00000000 00000000 php_pdo_odbc+0x1c75 0:000> This is using a modified version of mrethers' test case. I thought it was bad form to access $stmt->fetchAll() when $stmt was not a valid object, so simplified the test case to this: <?php # Problematic code example try { $dbh = new PDO('odbc:SAM', 'test', 'test'); } catch (Exception $e) { echo "Failed: " . $e->getMessage(); } $stmt = $dbh->query("SELECT * FROM foo.Employee"); ?> (where foo.Employee is a table that does not exist in the target database... same test works fine if I point to a table that does exist in the database). Previous Comments: ------------------------------------------------------------------------ [2005-12-14 15:35:06] [EMAIL PROTECTED] Hmm. Still getting a crash and the same backtraces with snapshot built On: Dec 14, 2005 11:30 GMT (SQLBindParameter with pdo_odbc.connection_pooling=off, SQLDriverConnectW with pdo_odbc.connection_pooling=strict or relaxed). mrethers, what version of odbc32.dll is installed on your system? Dan's system(crashes): 3.520.9042.0 Wez's system(no crash): 3.525.1117.0 ------------------------------------------------------------------------ [2005-12-14 06:03:42] [EMAIL PROTECTED] I couldn't reproduce the issue, but by working with Dan, did manage to get a couple of backtraces that highlighted some code that might cause something like this to happen. Please try the next snapshot dated after this message to see if that nailed it. ------------------------------------------------------------------------ [2005-12-12 22:49:23] [EMAIL PROTECTED] Confirmed the problem here with php5-win32-200512111930.zip from snaps.php.net, as well as php-5.1.1 Windows binary from php.net, running PHP CLI (taking Apache out of the equation). This is with DB2 V8 FixPak 10, using the DB2 sample database cataloged as a SYSTEM ODBC data source. Windows XP SP1 with all current (non SP2) fixes. My slight variation: SELECT * FROM EMPLOYEE works as expected, but SELECT * FROM FOO.EMPLOYEE (non-existent schema) causes Windows to pop up one of those handy little "CLI has encountered a problem and needs to close. Would you like to send this error report to microsoft?" dialogs. I would expect an error message like the following: SQL0204N "FOO.EMPLOYEE" is an undefined name. SQLSTATE=42704 ------------------------------------------------------------------------ [2005-12-09 05:21:27] [EMAIL PROTECTED] Can you reproduce this with mssql or access? ------------------------------------------------------------------------ [2005-12-08 22:42:52] [EMAIL PROTECTED] Assigned to the maintainer. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/35592 -- Edit this bug report at http://bugs.php.net/?id=35592&edit=1