Jump to content


Problem Connecting To Oracle Using Adodb

  • Please log in to reply
No replies to this topic

#1 everbright

  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 29 June 2006 - 04:04 PM

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:

$DB = NewADOConnection('oci8');  
$DB->PConnect("lportal", "lportaldbuser", "lportalpw");

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

print "Hi";

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:

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

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:

$DB->PConnect("lportal", "lportaldbuser", "lportalpw");

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!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users