|Anonymous | Login | Signup for a new account||11-13-2019 20:38 PST|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004292||[Quercus]||major||always||11-14-10 17:02||11-14-10 17:02|
|Summary||0004292: PDO constructor fails to throw PDOException|
In native PHP, connection errors experienced during a call to the PDO constructor trigger a PDOException which can be caught and handled by the application; in Quercus, however, only a "warning" message is emitted and the application incorrectly proceeds as though nothing has gone wrong.
This behaviour has been confirmed in Quercus 4.0.7 as distributed within Resin 4.0.13.
This bug can be easily demonstrated with the attached code; under native PHP the output is:
Error! SQLSTATE  FATAL: no pg_hba.conf entry for host "127.0.0.1", user "wrong-user", database "mydb", SSL off
Unfortunately with Quercus, the output is:
/opt/resin/var/www/webapps/testphp/PDOExceptionTest.php:10: Warning: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "wrong-user", database "mydb", SSL off
PDO connection success!
This bug is proving to be a show-stopper as it is allowing PHP code to continue running under the false belief that the PDO connection was successful.
|Attached Files||PDOExceptionTest.php [^] (540 bytes) 11-14-10 17:02|
|There are no notes attached to this issue.|
|11-14-10 17:02||db||New Issue|
|11-14-10 17:02||db||File Added: PDOExceptionTest.php|
|11-25-10 15:04||kdecherf||Issue Monitored: kdecherf|
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.|
25 unique queries executed.