Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql driver not installed error for Zend application

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

like image 810
Arc Avatar asked Jul 12 '09 09:07

Arc


3 Answers

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
like image 103
Greg Avatar answered Oct 20 '22 23:10

Greg


In php.ini file u just enable following line extension=php_pdo_mysql.dll (means remove comments in front of it)

then it will be executed Correctly.

like image 39
Azhar Ahammed Avatar answered Oct 20 '22 22:10

Azhar Ahammed


As others have mentionned, you need to enable the pdo_mysql extension.

However, running php (5.3) as an apache (2.2) module on my machine (windows 7), it still wouldn't work. I figured out the extension_dir value in php.ini needs to be set using an absolute path (relative just wouldn't work)!

Hope this helps some of you!

like image 4
djule5 Avatar answered Oct 20 '22 21:10

djule5