【发布时间】:2012-10-19 15:11:01
【问题描述】:
我已尝试将 PostgreSQL 与 Yii 连接,但正在显示
CDbConnection 未能打开数据库连接。
在日志中显示
error exception.CDbException
找不到驱动程序
我的代码
'db'=>array(
'tablePrefix'=>'',
'connectionString' => 'pgsql:host=localhost;port=5432;dbname=postgres',
'username'=>'postgres',
'password'=>'postgres',
'charset'=>'UTF8',
),
【问题讨论】:
-
您是否尝试通过控制台应用程序连接?
-
您确定连接正常吗?也许尝试一个“普通”的 PHP 连接,看看它是否首先工作
-
什么都试过了,还是不行.... apache httpd.conf 文件中有什么要编辑的吗?
标签: postgresql yii