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