my config file:
‘db’=>array(
‘class’=>‘CDbConnection’,
‘connectionString’ => ‘oci:dbname=172.30.1.39:1521/orcl;charset=utf8’,
‘emulatePrepare’ => true,
‘username’ => ‘imp’,
‘password’ => ‘aa’
),
error:
CDbConnection 无法开启数据库连线: SQLSTATE[HY000]: OCIEnvNlsCreate: Check the character set is valid and that PHP has access to Oracle libraries and NLS data (ext\pdo_oci\oci_driver.c:558)
D:\skill\finance\yii-1.1.10.r3566\framework\db\CDbConnection.php(382)
370 throw new CDbException(Yii::t(‘yii’,‘CDbConnection.connectionString cannot be empty.’));
371 try
372 {
373 Yii::trace(‘Opening DB connection’,‘system.db.CDbConnection’);
374 $this->_pdo=$this->createPdoInstance();
375 $this->initConnection($this->_pdo);
376 $this->_active=true;
377 }
378 catch(PDOException $e)
379 {
380 if(YII_DEBUG)
381 {
382 throw new CDbException(Yii::t(‘yii’,‘CDbConnection failed to open the DB connection: {error}’,
why ,thanks
My oracle:
SQL> select userenv(‘language’) from dual;
USERENV(‘LANGUAGE’)
SIMPLIFIED CHINESE_CHINA.AL32UTF8