MySql driver not installed error for Zend application
Solution 1
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
Solution 2
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.
Solution 3
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!
Arc
Updated on April 02, 2021Comments
-
Arc about 3 years
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
-
Arc almost 15 yearsDo i need to get something installed or just an entry to the php.ini?
-
Rob almost 15 years@Arkid: Your hosting provider will probably need to install the separate MySQL PDO driver module and ensure that it's enabled in the PHP configuration.
-
Mika Vatanen over 7 yearsIf you're adding extensions in single file manually, remember to load pdo.so before pdo_mysql.so, otherwise it doesn't work.