Jump to content

Recommended Posts

Hi!


I use Windows XP, MS IIS 5.1 and the PHP 5.1.4 installer from http://www.php.net and have installed Oracle Client and configured that to my db.
I want to connect to a Oracle 10 db on another server from a php web page on my computer.
Im a beginner to PHP.

My questions are:

1. Do I need to edit anything in php.ini to make this work?
I can find two names om dll files that i suspect have something to do with Oracle:

;extension=php_oci8.dll
;extension=php_oracle.dll

Do I need to activate any of those?

2. Since Im not good at PHP it would be very useful if I can look at example code that connects PHP to Oracle in a windows environment and IIS.


3. Do I need to do anything more?

Very grateful if anybody can help me or give me links to where I can find help.


Hi..

First you need to edit your php.ini file. make the oracle extension available by removing the ";". Remember, everytime you edit the php.ini file, you aslo need to restart the server.

The php code to connect Oracle is like $conn = ora_logon ("username", "password") or die(ora_error());
If your database reside in deifferent machine, your user name must similar like this: <username>@<ip address>.

For your information, im not expect in Oracle database, so please refer to www.php.net website for more information.

Thank you.
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.