Hello there,
I’m having troubles to run my Yii application. First of all, I’ve to say my application is working well under Windows environnement. The database is under Oracle 11g, connecting both with oci8 and pdo_oci. I mean both ways are working but I’m using only OCI8 on production. I’m now trying to execute it on Ubuntu Server 14.
I’ve tried to run PHP scripts with both pdo_oci and oci8 methods and they’re all working fine (under Ubuntu). I’m using Apache 2.4.7 and PHP 5.5.9.
So the problem comes from Yii. When I try to launch my application, I get this error :
CDbConnection failed to open the DB connection: could not find driver
Here is my config file where I define the database connection :
'db'=>array(
'class'=>'COciConnection',
'connectionString' => 'oci:dbname=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myservice)));charset=AL32UTF8;',
'username' => 'login',
'password' => 'password',
'schemaCachingDuration'=>3600,
'enableProfiling' => true, //Developpement
'enableParamLogging' => true, //Developpement
),
As you can see I’m using “COciConnection” class but I keep getting error on “CDbConnection”. Strange. I’ve changed my class to “CDbConnection” and “ext.oci8Pdo.OciDbConnection” in my config file and I keep getting the same error, regardless the class I’m using. I even tried to connect to a MySQL database and the same is happening (pdo_mysql is also installed on my server).
If I delete the file protected/config/main.php, I get the usual “unable to include main.php” error. Pretty classic. But it seems there is some sort of cache which make every changes to the ‘db’ part useless. I don’t know what to do, I’ve tried everything and I still don’t understand what’s wrong in my config file… Is somebody getting this ? As I said : this exact config file is working under Windows.
Thanks in advance for your help.