everbright Posted June 29, 2006 Share Posted June 29, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.