0% found this document useful (0 votes)
132 views

How To Enable Oracle Connection To PHP On XAMPP

To enable Oracle connection in PHP using XAMPP: 1. Install XAMPP and extract InstantClient to C:\instantclient_11_2. 2. Add C:\instantclient_11_2 to the system PATH variable. 3. Remove the semicolon from the 'oci8' string line in C:\xampp\php\php.ini. 4. Create a test PHP file called connection.php using oci_connect() to connect to an Oracle database. If connection succeeds, Oracle support is enabled.

Uploaded by

caiocesarss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views

How To Enable Oracle Connection To PHP On XAMPP

To enable Oracle connection in PHP using XAMPP: 1. Install XAMPP and extract InstantClient to C:\instantclient_11_2. 2. Add C:\instantclient_11_2 to the system PATH variable. 3. Remove the semicolon from the 'oci8' string line in C:\xampp\php\php.ini. 4. Create a test PHP file called connection.php using oci_connect() to connect to an Oracle database. If connection succeeds, Oracle support is enabled.

Uploaded by

caiocesarss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to enable Oracle Connection to PHP on XAMPP

1. Insta XAMPP 1.7.3 on your Wndows. (Pease remove the od verson of


XAMPP and pease deete C:\xampp BEFORE nstang the new verson of
XAMPP).
2. Extract InstantCent to C:\nstantcent_11_2 foder.
3. Open system settng at Start Menu > My Computer(rigt clic! on te
icon" > Select Propertie# > A$%ance$ &ab# > 'n%ironment (ariable#.
). Add to System Varabes by cckng *ew button and nsert the foowng
vaues:
a. Varabe Name : PATH
b. Varabe Vaue : c:\nstantcent_11_2
+. Cck OK to accept new modcaton.
,. Open C:\xampp\php\php.n by usng notepad.
-. Fnd strng oc8 and remove the ; symbo at the begnnng of the strng ne.
.. Save and Ext.
/. Restart you aptop/pc to accept new modcaton on xampp.
&o Cec! i0 Oracle connection #upport i# loa$e$ or not1
1. Open web browser.
2. In the address secton type http://ocahost/xampp
3. Once page oad, seect ppin0o(" menu from the nk on the eft secton of
the page.
4. Try to nd strng OCI8 by usng the search functon of your browser(or by
usng CTRL+F).
5. If there s strng found on OCI n your phpnfo() page. Then you can start
connecton to your orace database.
PHP code to connect to Orace
1. Open notepad.
2. Type foowng code:
<?php
$conn=oc_connect("username","password","172.16.60.72/orc");
If (!conn)
echo "Faed to connect to Orace";
ese
echo "Succesfuy connected wth Orace DB :-)";
?>
3. Save and ext the text es as : connecton.php(A Fes Category) at
C:\xampp\htdocs\
4. Once saved, pease open browser and enter URL
http://ocahost/connecton.php
5. If you see Text statng "Successfuy connected wth Orace DB :-) " , then you
are good to go.

You might also like