eatmore
(Debussyster)
1
Yii Interactive Tool v1.0 (based on Yii v1.0.10)
Please type ‘help’ for help. Type ‘exit’ to quit.
>> model User
Warning: include(PDO.php): failed to open stream: No such file or directory in D
:\GreenSoft\EasyPHP\www\yii\framework\YiiBase.php on line 337
Warning: include(): Failed opening ‘PDO.php’ for inclusion (include_path=’.
:\G
reenSoft\EasyPHP\www\bundle2\protected\components;D:\GreenSoft\EasyPHP\www\bundl
e2\protected\models;C:\php5\pear’) in D:\GreenSoft\EasyPHP\www\yii\framework\Yii
Base.php on line 337
Fatal error: Class ‘PDO’ not found in D:\GreenSoft\EasyPHP\www\yii\framework\db\
CDbConnection.php on line 289
but in requirement check,the pdo and pdo-mysql driver are all ok.and the pdo is bulid-in php.
Sagitta
(Sagittaq2)
2
Try to include the PDO module in the php.ini to use them and include in the PATH the php directory.
bsander
(Sanderb)
3
Could you share your Yii database config?
eatmore
(Debussyster)
4
phpinfo function shows there has pdo support.
php.ini:
extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_ibm.dll
;extension=php_pdo_informix.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
database setting:
'db'=>array(
'connectionString'=>'mysql:dbname=test',
'username'=>'root',
'password'=>'123456',
),
bsander
(Sanderb)
5
You forgot to specify a MySQL host. Maybe that’s messing things up?
eatmore
(Debussyster)
6
this works,I added ‘class’=>‘CDbConnection’.and use another wamp install.
'db'=>array(
'class'=>'CDbConnection',
'connectionString'=>'mysql:dbname=soft',
'username'=>'root',
'password'=>'',
),
thank you.