views:

213

answers:

3

My mysql connection setting:

<?php
  mysql_connect("fanyer.fatcowmysql.com", "test_username", "test_password") or die(mysql_error());
    echo "Connected to MySQL<br />";
  mysql_select_db("fanyer_database") or die(mysql_error());
    echo "Connected to Database";
?>

This is working perfectly.. Now i am using this in doctrine bootstrap file.

$conn = Doctrine_Manager::connection('mysql://test_username:[email protected]/fanyer_database', 'doctrine');

Giving an error

Uncaught exception 'Doctrine_Connection_Exception' with message 'Couldn't locate driver named mysql'

EDIT: changing it to sql Unknown driver sql

+1  A: 

I thought maybe it should be sql://test_username...., but the documentation says mysql: is right.

wallyk
The question is tagged 'mysql'.
Gonzalo
Thanks. Missed that.
wallyk
+1  A: 

You have to enable pdo_mysql in your php.ini. Instructions here.

Gonzalo
A: 

You have to enable pdo_mysql in your php.ini as Gonzaloand mentioned and check whether your host is supporting it or not cause i faced the same problem while hosting my application on fatcow as they people dont hav support for pdo

piemesons