Jump to content

Recommended Posts

Hi all,

I'm using PHP 5.1.4 and am now trying to connect to an Oracle database using ADODB library. Here's the sample code I used to test out:

[code]include("./adodb/adodb-exceptions.inc.php");
include("./adodb/adodb.inc.php");
$DB = NewADOConnection('oci8');  
$DB->PConnect("lportal", "lportaldbuser", "lportalpw");

try {  
    
    $DB->Execute("select * from wiki_user");
} catch (exception $e) {    
    print_r($e);
}

print "Hi";[/code]

I tried using Oracle SQL Plus to connect with the same credentials and it works there.

Here's what I got when I ran the script:

[code]Notice: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS' in E:\Miscellaneous\MediaWiki\adodb\adodb.inc.php on line 3930[/code]

Note that it didn't print "Hi", meaning that for some reason, it stopped execution somewhere before that and refused to spit out any more helpful error messages :-(

By commenting out and gradually uncommenting the lines, I found that the error happens with the line:

[code]$DB->PConnect("lportal", "lportaldbuser", "lportalpw");[/code]

Any ideas what I might have missed out here? How can I get more info on this error? Maybe some configuration with ADODB?

Thanks in advance for any suggestions!
Link to comment
https://forums.phpfreaks.com/topic/13221-problem-connecting-to-oracle-using-adodb/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.