newbie: help "Driver not found" Oracle OCI Ubuntu problem

Hello, I’m working on an ubuntu 9.4

Today I start to study Yii Framework

with MySql I can use the Shell CRUD without problems.

The problem is that in my company we use Oracle.

I’ve installed OCI (my phpinfo tell is ok)

and i can connect to oracle using direct connection in a PHP file.




     (HOST = myhost)

     (PORT = 1521)


(CONNECT_DATA = (SID = test))


$user = "user";

$password = "password";

if ($conn=oci_connect($user, $password, $db)) {

echo "Successfully connected to Oracle.\n";


} else {

$err = ocierror();

echo "Oracle Connect Error " . $err[text];


but if i use Yii and put this configuration in main.php:







and then try to launch Yii shell command: model TABLENAME

I’ve got this error:







exception ‘CDbException’ with message ‘CDbConnection failed to open the DB connection: could not find driver’

I tried to launch the shell by specyfing the php.ini as suggested in the guide, but it doesn’t solve the problem:

php -c path/to/php.ini protected/yiic.php shell

what other things I can try to do?

thank you for your help

You have to load PDO Oracle driver (pdo_oci, not standalone oci) and use db config like:







Thank you very much for your rapid answer.

Can you suggest me some guide on how to install pdo_oci library on ubuntu?

I’m googling for this, but what i’ve found is difficult for me

this is about oracle server installed, but I have only the client, the database is on other machine

I’m trying to compile by myself the library, but it’s not so easy

thank you


i have the same problem

any solution?