Find no driver when connect to Oracle db

i enabled php_oci8 and php_pdo_oci, and can connect by pdo out of Yii, but when i run model xxx, then , i got the error message that said , the connection failed before find no driver,

any suggestions?

here is the configuration detail

‘db’=>array(

		'class'=>'CDbConnection',


		'connectionString'=>'oci:dbname=//192.168.199.128:1521/xe',


		'username'=>'jchen',


		'password'=>'root'


	),

No one knows how to fix it?

You are probably missing Orcacle PDO drivers in PHP. Did you check that you use the right php.ini with yiic? Remember, PHP usually has different config files for the webserver module and the command line version.

See the second red box here:

http://www.yiiframework.com/doc/guide/quickstart.first-app-yiic

To find the location of your command line php.ini try this:


php --ini

Then you can add the right PDO module to your PHP CLI config file.

Thank you . i finally got it work.

hi Jack, I Have the same problem. Can u share your solution ?

don’t add the ‘charset’=>‘utf8’. like

‘db’=>array(

		'connectionString' => 'oci:dbname=192.168.0.250:1521/test',


		'emulatePrepare' => true,


		'username' => 'xxx',


		'password' => 'xxx'


	),

solve it.