Connecting to Oracle Database |
[eluser]imorris[/eluser]
I need some assistance getting connected to an Oracle database. I have the Oracle 10g client installed on my machine and have been able to connect to the database in other projects (like VB Scripting). I get an error when the page loads that looks like this: Code: A PHP Error was encountered Here is my dbconfig. Code: $active_group = "default";
[eluser]imorris[/eluser]
I figured out that I need to uncomment "OCI8" in php.ini. And now I'm getting a different error: Code: A Database Error Occurred
[eluser]imorris[/eluser]
I fixed it. I had to restart Apache after uncommenting php.ini. I verified that my tnsnames.ora was correct. I also changed my dbconfig to look like this: Code: $db['default']['hostname'] = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IPADDRESS>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SERVICE_NAME = <INSTANCE>)))";
[eluser]imorris[/eluser]
Ok, ran into last issue. How do I specify the name of the database? My queries are erroring out and I think it's because the database name isn't specified anywhere. The Wiki says that 'database' is ignored when using oci8.
[eluser]imorris[/eluser]
Nevermind. All is well now. Turns out (from reading this post: http://ellislab.com/forums/viewthread/161482/) that the query becomes case sensitive through Active Records. I adjusted my case and everything's better. |
Welcome Guest, Not a member yet? Register Sign In |