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

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

WBOY
Release: 2016-06-13 10:20:52
Original
1179 people have browsed it

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: 
Copy after login


------解决方案--------------------
结合另一个相类似问题的答案,可能是你没有配置好php扩展的路径
php.ini 的 extension_dir
最有效的解决方法还是查看apache或php的错误日志
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template