MySql driver not installed error for Zend application

Arc picture Arc · Jul 12, 2009 · Viewed 30.3k times · Source

I am trying to get my ZEND application up on my apache server running on UNIX. Initially my host didnot give PDO support ,and i got it enabled by requesting them with a mail.But now I am getting an error saying The mysql driver is not currently installed

The stack trace is like:

An error occurred
Application error
Exception information:

Message: The mysql driver is not currently installed
Stack trace:

#0 /home/windchim/worminc/library/Zend/Db/Adapter/Abstract.php(770): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/windchim/worminc/library/Zend/Db/Adapter/Abstract.php(840): Zend_Db_Adapter_Abstract->quote('aaditya258', NULL)
#2 /home/windchim/worminc/library/Zend/Auth/Adapter/DbTable.php(354): Zend_Db_Adapter_Abstract->quoteInto('`password` = MD...', 'aaditya258')
#3 /home/windchim/worminc/library/Zend/Auth/Adapter/DbTable.php(285): Zend_Auth_Adapter_DbTable->_authenticateCreateSelect()
#4 /home/windchim/worminc/library/Zend/Auth.php(117): Zend_Auth_Adapter_DbTable->authenticate()
#5 /home/windchim/worminc/application/controllers/LoginController.php(117): Zend_Auth->authenticate(Object(Zend_Auth_Adapter_DbTable))
#6 /home/windchim/worminc/library/Zend/Controller/Action.php(503): LoginController->processAction()
#7 /home/windchim/worminc/library/Zend/Controller/Dispatcher/Standard.php(285): Zend_Controller_Action->dispatch('processAction')
#8 /home/windchim/worminc/library/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /home/windchim/public_html/worm/index.php(47): Zend_Controller_Front->dispatch()
#10 {main}

How can this be resolved? Please help

Answer

Greg picture Greg · Jul 12, 2009

PDO, unlike the mysql_* functions, supports a number of database engines. To do this it needs a driver library for each one.

You have the "core" of PDO installed but not the MySQL driver - just get that installed (called pdo_mysql) and everything will be OK.

Your php.ini should have one of these (windows or linux):

extension=php_pdo_mysql.dll
extension=php_pdo_mysql.so