Could not find driver named mysql in php doctrine

My application worked fine on localhost. But when I downloaded the application to the server, I received an error message. I made a test file to check the data connection, this is the error I get. Please let me know how to fix this.

Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'Couldn't locate driver named mysql' in /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Connection.php:492 Stack trace: #0 /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Connection/Mysql.php(101): Doctrine_Connection->connect() #1 /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Connection.php(1008): Doctrine_Connection_Mysql->connect() #2 /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Query/Abstract.php(1094): Doctrine_Connection->execute('SELECT u.id AS ...', Array) #3 /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Query/Abstract.php(1142): Doctrine_Query_Abstract->_execute(Array) #4 /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/models/Users.php(22): Doctrine_Query_Abstract->execute() #5 /hermes/web05/b1392/moo.fanyer/httpdocs/test.php(8): Users->get_details_username('mohit') #6 {main} thrown in /hermes/web05/b1392/moo.fanyer/httpdocs/doctrine/lib/Doctrine/Connection.php on line 492 

Edit: how to enable my SQL drivers .. ???

+7
php doctrine configuration-files
source share
3 answers

Make sure that:

  • The mysql extension is enabled on the server where you upload files.
  • You have indicated the correct paths.
  • there are no problems with access rights to directories
+5
source share

apt-get install php5-mysql ---------------

+9
source share

Include pdo_mysql in php.ini file

+6
source share

All Articles