|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34756 PDOExceptions aren't derived from Exception which will cause a Fatal error
Submitted: 2005-10-06 13:59 UTC Modified: 2005-10-06 16:02 UTC
From: Assigned: helly (profile)
Status: Not a bug Package: PDO related
PHP Version: 5CVS-2005-10-06 (CVS) OS: Mac OS X 10.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2005-10-06 13:59 UTC]
The summary says it all. I upgraded to RC2-dev and noticed that if something goes wrong and PDO::ERRMODE_EXCEPTION is set I get a Fatal error.

Reproduce code:
$pdo = New PDO(...);
$pdo->query("SELECT FROM");

Expected result:
Exception thrown as usual.

Actual result:
PHP Fatal error:  Exceptions must be valid objects derived from the Exception base class in ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-06 14:17 UTC]
Can't reproduce.
What was your ./configure line ?
 [2005-10-06 14:58 UTC]
Configure line goes here:

./configure --prefix=/usr/local --with-apxs2=/usr/local/bin/apxs --disable-cgi --enable-mbstring --with-zlib --with-pdo-mysql --with-pdo-pgsql=/opt/local/lib/pgsql8 --with-ldap --with-pgsql --with-mysql --with-mssql=/opt/local --with-pdo-dblib=/opt/local --without-pear

I tested this with RC1 and it works as expected but I get the error on RC2-dev. I talked with Derick earlier today and he verified that he has noticed the same behavior as well.
 [2005-10-06 15:13 UTC]
Marcus, if I understood correctly, you had something to do with this. :)

 [2005-10-06 16:00 UTC]
My bad!

I should've compiled a more recent version before posting the report. That one I was running was from yesterday - trying with most recent snapshot it works like a charm.
 [2005-10-06 16:02 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 07:01:34 2024 UTC