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:

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


Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2005-12-08 17:09:17] mrethers at ebcubes dot com

I tried downloading the last snapshot for win32 but it now completely
crashes my applcation. The XML DOM extension seems to be the issue

# Suspected Code
$doc = new DOMDocument;
$doc->Load(CONFIG_PATH);
if (!$doc->validate()) {
    throw new Exception("Mapping file is not valid");
}

Also I still have the DB2/ODBC problem :

# Problematic code example
try {
  $dbh = new PDO('odbc:TEST', 'user', 'password');
} catch (Exception $e) {
  echo "Failed: " . $e->getMessage();
}
$stmt = $dbh->query("SELECT * FROM Table1");
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$rs = $stmt->fetchAll();
echo count($rs) . " : ";

when correct query should be SELECT * FROM SCHEMA1.Table1
crashes Apache before $stmt->setFetchMode(PDO::FETCH_ASSOC);

------------------------------------------------------------------------

[2005-12-08 11:26:51] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip



------------------------------------------------------------------------

[2005-12-08 00:05:28] mrethers at ebcubes dot com

Description:
------------
I'm using a db2 database with pdo:odbc and some bad queries would crash
Apache. It's a major problem for debugging as I have to verify all the
requests with a SQL command line tool.

Reproduce code:
---------------
SELECT * FROM TableA, TableB;

>> where TableA and TableB are in schema SCHEMA_1

The acutal query should be:

SELECT * FROM SCHEMA_1.TableA, SCHEMA_2.TableB;

Expected result:
----------------
SQL Exception from error thrown by the database


Actual result:
--------------
Apache crashes


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35592&edit=1

Reply via email to