CodeIgniter Forums
Using Oracle with PHP and CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Using Oracle with PHP and CodeIgniter (/showthread.php?tid=4554)

Pages: 1 2


Using Oracle with PHP and CodeIgniter - El Forum - 11-12-2009

[eluser]Unknown[/eluser]
Link to the article on the Way back Machine:

http://web.archive.org/web/20080421154810/http://www.abbett.org/2007/12/02/using-oracle-with-php-and-codeigniter/


Using Oracle with PHP and CodeIgniter - El Forum - 06-29-2010

[eluser]uk81[/eluser]
@jabbett
Thanks for this article. This may help me develop a gateway to a oracle db. Smile


It´s really fun to program with CI and interacts with the community here if I have any questions or suggestions. Smile


Using Oracle with PHP and CodeIgniter - El Forum - 01-21-2011

[eluser]szymon23[/eluser]
Hello everyone!

I had to deal with the problem of connecting to an Oracle database this morning and ran into this thread on the forum. Unfortunately none of the solutions seemed to be working for me. I didn't get any warnings or big PHP errors, but a nice CI 'couldn't connect to database' message.

It turned out, my problem was the $db['default']['hostname'] connection parameter.
I'm not an expert in database configuration, so I don't really know what was behind the problem/solution, but what worked for me was this:

I opened the Oracle Net Manager found in the Configuration and Migration Tools of the OraClient10g group in the Windows Start Menu. I went into the "Service Naming" branch of the tree found there and found one item there (some kind of alias? I don't remember how it got there, so perhaps you will need to configure this). After I replaced the IP address I used before as my hostname with the name found in the Net Manager everything clicked and CI connected with my Oracle database.
I'm sure the attached screenshot explains it.

Hope this helps someone.

Best regards,
szymon