MySql driver not installed error for Zend application
Asked Answered
M

5

11

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

Ministry answered 12/7, 2009 at 9:42 Comment(0)
R
19

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
Ridden answered 12/7, 2009 at 9:46 Comment(3)
Do i need to get something installed or just an entry to the php.ini?Ministry
@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.Collocate
If you're adding extensions in single file manually, remember to load pdo.so before pdo_mysql.so, otherwise it doesn't work.Vertievertiginous
L
5

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.

Leidaleiden answered 6/11, 2010 at 15:55 Comment(0)
T
4

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!

Tracitracie answered 17/5, 2012 at 17:16 Comment(0)
T
1

mysql extension was deprecated and is totally removed in php7

You should check php-mysql package. If not yet install, let run sudo apt-get install php-mysql

Turboprop answered 2/4, 2021 at 8:7 Comment(0)
S
-2

F.i. check spelling of error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT (should be like this at production stage)

If you type error_reporting (value); or something like this (usually for testing, "value" might be "0")

you may get this mistake "The mysql driver is not currently installed" if you use

So any Syntax Error within the php.ini might generate this mistake. If you setup your system carefully always you might get confused easily, because you know, there are no mistakes at db installation or settings. If everthing else is correct, so go for a syntax error in php.ini.

Swimmingly answered 16/2, 2015 at 21:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.