ID: 35592
Comment by: sumguyovrthar at gmail dot com
Reported By: mrethers at ebcubes dot com
Status: No Feedback
Bug Type: PDO related
Operating System: Windows XP SP2
PHP Version: 5.1.1
Assigned To: wez
New Comment:
I still have the same problem with PHP 5.2.3, and not only with PDO but
also with the ODBC extension (odbc_connect(), etc).
I have an older update of Win XP: SP1, and my odbc32.dll version is
3.520.90.42.0.
Apache's logs say a child process exited with status 3221225477 when
this happens.
When Apache crashes and I don't stop my browser from loading, once
Apache picks up again it continues doing what it was doing and the rest
of my PHP script runs as it should.
This code:
<?php
$db = odbc_pconnect( 'rentmasterdb', 'George Washington', '' );
print_r( odbc_fetch_array( odbc_tables( $db ) ) );
?>
Crashes Apache at odbc_pconnect(), then yields the first returned row:
Array
(
[TABLE_CAT] => C:\PROGRAM FILES\RENTMASTER INC\RENTMASTER\DATA
[TABLE_SCHEM] =>
[TABLE_NAME] => addresses
[TABLE_TYPE] => TABLE
[REMARKS] =>
)
So it connects OK after getting by the Microsoft error reporting
dialogs and restarting the child process. I thought using a persistent
connection might only crash it on the first run and then not crash when
it picks up the connection later, but I'm using the PHP CGI binary so I
guess that's why it didn't work.
Previous Comments:
------------------------------------------------------------------------
[2005-12-29 01:00:05] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-12-21 20:29:44] [EMAIL PROTECTED]
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).
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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