Home  >  Article  >  Database  >  PHP5.3为Yii PHP框架配置php pdo mysql不成功的解决方案

PHP5.3为Yii PHP框架配置php pdo mysql不成功的解决方案

WBOY
WBOYOriginal
2016-06-07 17:41:05948browse

因项目需要使用PHPYii框架,有同事配置php和yii在Yii框架,访问Yii组件必要条件网页显示mysqlpdo一直未加载:经检查php.ini文件,组件已经设置为加载:extension

因项目需要使用PHP Yii框架,有同事配置php和yii在Yii框架,香港虚拟主机,香港虚拟主机,访问Yii组件必要条件网页显示mysql pdo一直未加载:



经检查php.ini文件,组件已经设置为加载:

extension_dir = "ext"

cgi.force_redirect = 0

extension=php_mbstring.dll 

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_pdo_mysql.dll


经研究和试验,发现是extension_dir 的原因,必须设为绝对路径才可加载成功:

extension_dir = "D:/var/php53/ext"

重启Apache,再打开Yii框架页面及显示加载成功:


本文出自 “小何贝贝的技术空间” 博客,请务必保留此出处

,网站空间
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