Yii - Oracle Connection

Hi,

I’m trying to connect my yii project with oracle database, but nothing is working.

I have already tried this

http://www.yiiframework.com/wiki/99/using-yii-with-oracle-through-pdo/

and this

http://www.yiiframework.com/extension/oci8pdo/

But none of them has worked, the page just gets blank and shows no errors that would help to debug when I print var_dump(Yii::app()->db);

The current connection db in config/main.php is like this

‘db’=>array(

         'class'=>'CDbConnection',


        'connectionString' => 'oci:dbname=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=***)(PORT=***))(CONNECT_DATA=(SERVICE_NAME=***)));charset=UTF8;',


        'username'=>'***',


        'password'=>'***',


    ),

Note: ‘***’ are correctly placed.

What’s wrong? What else could I try? Can someone help me please urgently…

When you are using the oci8Pdo extension:




'db' => array(

  'class'=>'ext.oci8Pdo.OciDbConnection',

  'connectionString' => 'oci:dbname=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=***)(PORT=***))(CONNECT_DATA=(SERVICE_NAME=***)));charset=AL32UTF8;',

  'username'=>'***',

  'password'=>'***',

),



Take note of the class and the charset. Works for me.

Thanks for your reply Yes I add this class and be informed I’m currently using oracle 9.

Thanks all

Oracle 9iR2 or above? See http://php.net/manual/en/oci8.requirements.php