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.

$db="(DESCRIPTION =

  (ADDRESS =


     (PROTOCOL = TCP)


     (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";

#ocilogoff($conn);

} else {

$err = ocierror();

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

}

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

    'db'=>array(


		'class'=>'CDbConnection',


		'connectionString'=>'oci:PROVA=//1.2.3.4:1521/test',


		'username'=>'username',


		'password'=>'password'


	),

and then try to launch Yii shell command: model TABLENAME

I’ve got this error:

    'db'=>array(


		'class'=>'CDbConnection',


		'connectionString'=>'oci:PROVA=//10.8.1.207:1521/test',


		'username'=>'PROVA',


		'password'=>'PROVA'


	),

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:

‘db’=>array(

‘class’=>‘CDbConnection’,

‘connectionString’=>‘oci:dbname=10.8.1.207/test’,

‘username’=>‘PROVA’,

‘password’=>‘PROVA’

),

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

http://pecl.php.net/bugs/bug.php?id=9253

thank you

Hi

i have the same problem

any solution?