Yii Framework Forum: Can't Connect Yii To Oracle Db - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can't Connect Yii To Oracle Db Rate Topic: ***** 1 Votes

#1 User is offline   Rathilesh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 16-May 13

Posted 27 May 2013 - 06:07 AM

Please help me !

I Can't connect yii to oracle db

I put this code in protected/config/main.php
'db'=>array
(
    'class'=>'CDbConnection',
    'connectionString'=>'oci:dbname=192.168.11.33:1521/orcl;charset=UTF8',
    'username'=>'*****',
    'password'=>'*****',
),


Am using in LATEST WAMP server , But an error occured


like this


CDbConnection failed to open the DB connection: could not find driver

C:\wamp\www\yii\framework\gii\generators\model\ModelCode.php(57)

0

#2 User is offline   RSfTDL 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 22-June 12

Posted 27 May 2013 - 06:14 AM

Hi!

Do you have the Oracle extensions enabled on PHP?
0

#3 User is offline   Rathilesh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 16-May 13

Posted 27 May 2013 - 06:22 AM

View PostRSfTDL, on 27 May 2013 - 06:14 AM, said:

Hi!

Do you have the Oracle extensions enabled on PHP?



Thanks for your quck reply


My php version is 5.3.13
in wamp server i tick php extension in php_pdo_oci but a warning is occured PHPStartup:Unable to load Dynamic librery C:/wamp/bin/php/php5.3.13/ext/php_pdo_oci.dill the specified module could not be found
0

#4 User is offline   RSfTDL 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 22-June 12

Posted 27 May 2013 - 06:29 AM

That's strange. I'm using PHP5.4.3 and no error at all! Check you php.ini and see if the extension=php_oci8.dll has the';' at the beginning. Also check if the file exists on you extensions directory.
0

#5 User is offline   Rathilesh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 16-May 13

Posted 27 May 2013 - 06:37 AM

View PostRSfTDL, on 27 May 2013 - 06:29 AM, said:

That's strange. I'm using PHP5.4.3 and no error at all! Check you php.ini and see if the extension=php_oci8.dll has the';' at the beginning. Also check if the file exists on you extensions directory.



1) ;extension=php_oci8.dll in my php.ini (it is currect ?)

2) Yes , php_oci8.dll file found on my extensions directory
0

#6 User is offline   RSfTDL 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 22-June 12

Posted 27 May 2013 - 06:45 AM

And the php_pdo_oci.dll is also there? Chech if the extension has the ';'. Is yes remove it and restart the services on WAMP. Also check if the PHP loaded the extensions on WAMP.

Do you have the Oracle Instant Client libraries? I think you need that to be able to use these extensions.

Btw...looks like a common error. Give a read here. Try upgrade the WAMP to the last version.
0

#7 User is offline   Rathilesh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 16-May 13

Posted 27 May 2013 - 06:53 AM

View PostRSfTDL, on 27 May 2013 - 06:45 AM, said:

And the php_pdo_oci.dll is also there? Chech if the extension has the ';'. Is yes remove it and restart the services on WAMP. Also check if the PHP loaded the extensions on WAMP.

Do you have the Oracle Instant Client libraries? I think you need that to be able to use these extensions.

Btw...looks like a common error. Give a read here. Try upgrade the WAMP to the last version.

php_pdo_oci.dll also there
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users