I’m completely new to PHP and thus to Yii and Gii. I’ve been going through the framework tutorials and it’s been relatively painless so I though it was time to start experimenting with Oracle connections.
My trouble is apparently getting Gii to connect to Oracle. When I launch Gii (the Web version), I get:
Digging the PHP application log I get this stack trace:
My Oracle OCI instalation was pretty minimal, I just edited PHP.INI and uncommented:
extension=php_oci8_11g.dll
I didn’t venture to get FastCGI (because my PHP version - from a straight XAMPP install - wasn’t the suggested NTS for FastCGI).
And its work like a charm. My application is now in production server and everything is working fine. i follow all the guidelines from this link and everything seems work fine.
Also as you are saying that it only getting problem on Gii module then i think its a strange.
What i will suggest to you here is create a one model class manually and then try to execute some sql statements in your project and lets see are you getting some kind of problem also there.
And please make sure that you have installed the correct extension on server.
So did I, that’s also where I learned how to build my connection string.
I’ll look around the tutorials and try to do it manually…
What do you mean? This is a local Netbeans PHP/XAMPP/Yii/OCI install, accessing Oracle database on a remote server. I do have a local Oracle client (not the Instant Client but the full one). Do I need to configure anything else for OCI apart from activating it in PHP.ini?
Ok, i understand you point. What i mean here is by extension is. check your php.ini file or check phpinfo that all oracle related drivers are also enabled or not.Another oracle-pdo extension also enable or not.Just to make sure and nothing else
And again i will say try to do some test model query task and lets see what is happening there.
Also please don’t forget to share your experience here.Since, i am also learning to work with oracle+yii ;)So, it would be great if you can share your thoughts also here.
oci8
OCI8 Support enabled
Version 1.4.10
Revision $Id: 44bfa713983a99b3e59477f6532e5fb51b6dee94 $
Active Persistent Connections 0
Active Connections 0
Oracle Run-time Client Library Version 11.2.0.1.0
Oracle Instant Client Version 11.2
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.connection_class no value no value
oci8.default_prefetch 100 100
oci8.events Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
As I said in the previous post, I’m off to CI which had it’s fair share of quirks of database configuration and their case sensitive issues when using table/column names, but which is now working well. Meanwhile, and just out of curiosity, I found out I could go an extra step further with yii and what seemed to be the problem was that very same connection parameter.
Well… sort of works, now that I don’t get the connect error, I’m getting a timeout:
[color="#8B0000"]Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\php\yii-[font="Arial"]1.1.13.e9e4a0\framework\db\CDbCommand.php on line 506[/font][/color]