Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2003, 05:09 AM
Registered User
Join Date: Nov 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to oracle from PHP

I am trying to connect to oracle 9i using PHP. I am using ADODB for the same.
Oracle 9i
PHP 4.3.4
ADODB 4.0.3
Window 2000 Professional

I have extracted the ADODB zip file on the C Drive.

The part of the code is as follows

$db = ADONewConnection('oci8po');

$db->PConnect('','PHPUser','PHPUser','OracleServer') ;


Following are the error messages that i am getting when i execute the page.

Notice: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS' in C:\adodb\adodb.inc.php on line 3197

Fatal error: Call to undefined function: ociplogon() in C:\adodb\drivers\adodb-oci8.inc.php on line 136

My oracle server is on the different machine.
I am able to connect to the server from my machine using SQLPLUS

Could somebody please help me ??

thanks and regards
Parag Joshi
Reply With Quote
  #2 (permalink)  
Old November 13th, 2003, 10:48 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

Okay, I've got a few questions for you:

Why are you connecting to Oracle through ADO? Have you tried accessing it via the Oracle 9 PHP extension?

Where did you get your ADODB php library from? Have you read through its documentation to figure out how you're supposed to use it?

If you're including a library file that complains about undefined constants, then my hunch is that you should be including a different file that defines all the constants needed by the library file. Well, either that or you're supposed to define all the constants yourself. Whatever the case, the answer should be in the documentation for your ADODB library.

Also, your error message suggests that you're using the Oracle 8 call interface, but you're using oracle 9. I've never used PHP with Oracle, so I can't say for sure, but you'll probably get better results by making sure all your versions match up.

Take care,

Reply With Quote
  #3 (permalink)  
Old November 16th, 2011, 05:26 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


correct sentences "ADOdb 5"

Is better relative path

$server ="" //Server local ( or localhost) or remote server (190.168.XXX.XXX)
$db = NewADOConnection('oci8'); // For Oracle XE 8, 9 an 10 version
$db->PConnect($server,'oracleUser','oraclePassword','d atabase') ; // For Oracle 10g XE, the database is XE

The problem " OCI_COMMIT_ON_SUCCESS" is because the file php.ini en the php directory is written as ;extension=php_oci8.dll
This should be replaced by extension=php_oci8.dll wihtout ";", restart apache service and ready.

Last edited by mokanime; November 16th, 2011 at 05:28 PM.. Reason: Complementary information
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Connecting to Oracle vikasagarwal1984 ASP.NET 1.0 and 1.1 Basics 1 October 1st, 2006 01:03 PM
Connecting to Oracle with PHP atcs2152 PHP Databases 0 December 16th, 2005 08:57 AM
Connecting to Oracle without Oracle Client mahaveerar VB Databases Basics 0 February 22nd, 2005 05:18 PM
Connecting to Oracle without Oracle Client mahaveerar Excel VBA 0 February 22nd, 2005 03:55 PM
connecting to oracle amcp2002 Java Databases 2 September 20th, 2003 05:17 PM

All times are GMT -4. The time now is 04:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.