Jump to content

Archived

This topic is now archived and is closed to further replies.

Mikeman666

How to connect to Oracle 10 from PHP web page on Whindows XP and IIS?

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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.