Author Topic: Connecting to Oracle 10g using PHP  (Read 1694 times)

0 Members and 1 Guest are viewing this topic.

Offline paragkalraTopic starter

  • Irregular
  • Posts: 29
  • Gender: Male
    • View Profile
    • paragkalra.com
Connecting to Oracle 10g using PHP
« on: May 26, 2010, 06:52:57 PM »
Hey All,

This for the first time I want to connect Oracle DB (10g) using PHP. So far I have been doing it using Perl

What are the pre-requisites - Like which version of PHP, any driver etc. My Oracle DB is located remotely.

To start off with I want to fetch some rows on Windows and then move to Unix. Hence I would also need the prequisites for Unix as well (Solaris).
Parag.A.Kalra, The Linux Man
http://www.paragkalra.com/
In this world without WALLS and GATES who need WINDOWS! USE LINUX! STOP PIRACY! GO OPEN SOURCE!

Offline mits

  • Irregular
  • Posts: 22
    • View Profile
Re: Connecting to Oracle 10g using PHP
« Reply #1 on: June 03, 2010, 05:04:34 PM »
My next project will involve using an Oracle DB with PHP instead of the usual MySQL.

I've read a little about PHP and Oracle and so far I have done the following.

1) Installed Oracle 10g express
2) Downloaded Oracle Instant Client

As far as i'm aware, i need to do the following;
1) Add the path of the Instant Client to the windows PATH
2) uncomment the OCI8 library in the php.ini file under extensions.

and hopefully all should be fine!

is there anything else I will need to do to configure PHP with Oracle?


I'm going to go via http://www.oracle.com/technology/pub/notes/technote_php_instant.html

...and hope for the best!

Offline mits

  • Irregular
  • Posts: 22
    • View Profile
Re: Connecting to Oracle 10g using PHP
« Reply #2 on: June 08, 2010, 05:51:15 PM »
well i got oracle working with php using the above instructions.

install oracle on your local machine if needed
download instant client
add the instant client directory to windows path
enable oci8 in the php.ini file

...and you should be good to go