Home >Backend Development >PHP Tutorial >symfony报错:Couldn't locate driver named mysql,该如何处理

symfony报错:Couldn't locate driver named mysql,该如何处理

WBOY
WBOYOriginal
2016-06-13 10:20:521176browse

symfony报错:Couldn't locate driver named mysql
如题,使用symfony1.4,数据模型什么的通过命令行连接数据库都自动生成完毕,期间,没有报错。在运行时(连接数据库查询数据),报错:500 | Internal Server Error | Doctrine_Connection_Exception

Couldn't locate driver named mysql。
恩,php.ini 使用Mysql数据库的配置全打开了。为什么还出错呢?为什么呢???
配置数据库的文件,使用的是databases.yml,

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->all:  doctrine:    class: sfDoctrineDatabase    param:      dsn:      mysql:host=127.0.0.1;dbname=hr_administration      username: root      password: 


------解决方案--------------------
结合另一个相类似问题的答案,可能是你没有配置好php扩展的路径
php.ini 的 extension_dir
最有效的解决方法还是查看apache或php的错误日志
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn