ZF-58: Checking for PDO extensions (Trac #114)


I have a suggestion for the Zend_Db component of the Zend Framework. I was wondering if it would be possible to include a check in the Db component to check to see if the PDO extensions are installed on a system.

I am working on a database application and was trying to get information to the database. After trying everything in the manual, I checked my installation and found out the I did not have the PDO extensions installed.

If a check for PDO was in place and threw an exception, I would have cut down on my debugging.

Anyway, just a suggestion. Thank you for you time and for a great framework.

Regards, Troy L. Marker


This patch adds a check to make sure the PDO driver is installed. If not it throws a Zend_DB_Adapter_Exception

Added a check for the slected PDO driver.

Patch lead to identification of another bug (see [ZF-164]) and related issues with checks/tests at run-time.

Also see the fw-general discussion regarding Zend_Environment, and where to put checks and tests that do not need to be executed on instantiation / every page view.