ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using Oracle with PHP and CodeIgniter

December 02, 2007 5:24pm

Subscribe [8]
  • #1 / Dec 02, 2007 5:24pm

    jabbett

    20 posts

    I just spent a few minutes writing up my experience configuring PHP and CodeIgniter to use an Oracle database, and thought it might be beneficial to the community.

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

    It covers enabling PHP’s Oracle support, configuring CodeIgniter to connect to an Oracle database, and using Active Record against an Oracle database.  It might be useful to anyone encountering:

    == “Unable to load dynamic library” / php_oci8.dll errors
    == “Use of undefined constant OCI_COMMIT_ON_SUCCESS” notices
    == ORA-12514 warnings
    == ocifetchinto / ociexecute warnings

  • #2 / Dec 02, 2007 7:07pm

    gtech

    824 posts

    thanks very much for that!

  • #3 / Dec 02, 2007 8:11pm

    Derek Allard

    3168 posts

    Bravo, thanks Jonathan!  This is super.

  • #4 / Jan 08, 2008 5:06am

    dark_lord

    103 posts

    How about in Sybase? hehe… Thanks!

  • #5 / Jan 08, 2008 9:08am

    Derek Allard

    3168 posts

    Not currently, but you may be able to use ODBC drivers for it… not sure.  Sorry.

  • #6 / Jan 08, 2008 9:16pm

    dark_lord

    103 posts

    O I C.. Okay I’ll try your suggestion anyway, Thank you very much Mr. Administrator.. Till next Q. hehe.

  • #7 / Jan 08, 2008 10:12pm

    Derek Allard

    3168 posts

    LOL, not at all wish_bear.  I’d be interested in expanding the db capabilities of CI, so if you get very far please do report back!

  • #8 / Jul 31, 2009 7:32am

    Bhupendra

    2 posts

    abbett.org has been blocked reported as attack site.  Is there any other site where we can learn codeigniter with oracle?

    I just spent a few minutes writing up my experience configuring PHP and CodeIgniter to use an Oracle database, and thought it might be beneficial to the community.

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

    It covers enabling PHP’s Oracle support, configuring CodeIgniter to connect to an Oracle database, and using Active Record against an Oracle database.  It might be useful to anyone encountering:

    == “Unable to load dynamic library” / php_oci8.dll errors
    == “Use of undefined constant OCI_COMMIT_ON_SUCCESS” notices
    == ORA-12514 warnings
    == ocifetchinto / ociexecute warnings

  • #9 / Sep 10, 2009 1:38pm

    moocowmason

    1 posts

    archive.org has a copy of it from 2008

  • #10 / Sep 10, 2009 3:05pm

    BrianDHall

    760 posts

    I got a 404 File Not Found error when trying to visit the link.

  • #11 / Nov 12, 2009 8:56am

    robertj

    1 posts

  • #12 / Jun 29, 2010 10:39am

    uk81

    7 posts

    @jabbett
    Thanks for this article. This may help me develop a gateway to a oracle db. 😊


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

  • #13 / Jan 21, 2011 4:49am

    szymon23

    2 posts

    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

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases