views:

2637

answers:

2

My application was working perfectly on localhost. But when i uploaded the application on server i got an error. I made a test file to check databse connection, this is the error i am getting. Please hellp me 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..???

+1  A: 

Make sure that:

  • mysql extension is enabled on the server where you have uploaded files.
  • you have specified the correct paths.
  • there are no directory permission issues
Sarfraz
how to enable the mysql extension can u help me regarding this...
piemesons
you need to ask server support team where your site is going to be run.
Sarfraz
+2  A: 

Enable pdo_mysql in the php.ini file

krishna