#39822 [Opn->Asn]: new PDO() doesn't work with firebird
| From: | tony2001@php.net | Date: | Mon, 18 Dec 2006 10:39:42 +0000 |
| Subject: | #39822 [Opn->Asn]: new PDO() doesn't work with firebird | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106480@lists.php.net to get a copy of this message | ||
ID: 39822
Updated by: tony2001@php.net
Reported By: bx at clansphere dot de
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: Windows XP SP2
PHP Version: 5CVS-2006-12-13 (snap)
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2006-12-13 22:08:25] bx at clansphere dot de
Description:
------------
using try/catch doesn't work for firebird like it works with other
rdbms extensions. i think the problem is that firebird returns
something (NULL) so that try expects all went well, but it is not
checking for the PDO object itself.
i am using is_object() currently to look for errors, but that way i
can't get errorcodes like 'database does not exist' for example and
even when track_errors is enabled $php_errormsg is empty.
Reproduce code:
---------------
try {
$connection = new PDO('firebird:dbname=test.fdb', $user,
$password);
}
catch(PDOException $error) {
echo $error->getMessage();
}
Expected result:
----------------
catch can be called to get the exact error
Actual result:
--------------
try statement thinks everything is ok
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39822&edit=1