Mantis Bugtracker

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
Reporter db View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.13
Summary 0004292: PDO constructor fails to throw PDOException
Description 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[08006] [7] FATAL: no pg_hba.conf entry for host "", 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 "", 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.
Additional Information
Attached Files  PDOExceptionTest.php [^] (540 bytes) 11-14-10 17:02

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
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.
Powered by Mantis Bugtracker