Jump to content


Photo

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


  • Please log in to reply
1 reply to this topic

#1 Mikeman666

Mikeman666
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 July 2006 - 06:50 AM

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.




#2 anandharaj

anandharaj
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 July 2006 - 10:10 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users