From: bx at clansphere dot de
Operating system: Windows XP SP2
PHP version: 5CVS-2006-12-13 (snap)
PHP Bug Type: PDO related
Bug description: new PDO() doesn't work with firebird
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 bug report at http://bugs.php.net/?id=39822&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39822&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39822&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39822&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39822&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39822&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39822&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39822&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39822&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39822&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39822&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39822&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39822&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39822&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39822&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39822&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39822&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39822&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39822&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39822&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39822&r=mysqlcfg