pdo error

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=’.;D:\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.

Try to include the PDO module in the php.ini to use them and include in the PATH the php directory.

Could you share your Yii database config?

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',


		),

You forgot to specify a MySQL host. Maybe that’s messing things up?

this works,I added ‘class’=>‘CDbConnection’.and use another wamp install.

'db'=>array(


		'class'=>'CDbConnection',


		'connectionString'=>'mysql:dbname=soft',


		'username'=>'root',


		'password'=>'',


	),

thank you.