Adsense Ad

Friday, 5 June 2020

Connect Oracle 12c With PHP

First of all I would like to thank my friend Mr. AhsanHussain for this wonderful document to help us understand the Oracle Database connection with PHP in an easy way.

 

1.    After installing Xampp server, edit "C:\xampp\php\php.ini" and un-comment the line "extension=oci8_12c". Make sure "extension_dir" is set to the directory containing the PHP extension DLLs. For example,

extension=oci8_12c

extension_dir="C:\xampp\php\ext"

2.    Download the Oracle Instant Client Basic Package According to your database version























 


3.    Extract the file in a directory such as "D:\Oracle". A sub-directory "D:\Oracle\instantclient_12_2" will be created.

Add this sub-directory to the PATH environment variable. You can update PATH in Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables -> PATH. In my example I set it to "D:\Oracle\instantclient_12_2".

4.    Restart the Xampp server and check. It shows the OCI8 extension is loaded successfully.

 

Start Xampp Server


Step 1ST: Navigate to directory where Xampp server is installed,

Screen Shot:

 

 

Step 2nd: Run xampp-control.exe as administrator

Screen Shot:

 

 

Step 3rd: Start Apache and MySQL server.

Screen Shot:


1 comment: