开发者

doctrine path setting

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:test_password@fanyer.fatcowmysql.com/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


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜