Php – Configuring Oracle OCI8 for windows 64 bit

oci8oraclePHP

I have been facing problems configuring oracle oci8 for windows

I'm using windows 7 64 bit, xampp v3.2.2, php 5.6.15 and oracle g11 express

I have tried the following steps but I can't find the oci package when running phpinfo:

  1. I downloaded both Instant Client Package – Basic and Instant Client Package – ODBC Version 12.1.0.2.0

  2. unzip the files into one file in c to be at the following path (C:\instantclient_11_2)

  3. add the path to environment variable (path) for oracle product (C:\instantclient_11_2;C:\oraclexe\app\oracle\product\11.2.0\server\bin;)

  4. restart my computer

  5. run the script (odbc_install)

    6- removed ; infront of the extension=php_oci8_11g.dll in php.ini

but It didn't work , can anyone tell me why?

Best Answer

Oracle 11g + WAMP + Windows. This tutorial shows you how to use PHP with Oracle Database 11g. First of all let's assume that I am using Windows 7 64bit along with Oracle database 11G and WAMP server, so I have already downloaded Oracle instant client x64. If you are using 32bit Windows then download 32bit client otherwise it wont work. Steps :-

  1. Install Oracle database 11g XE

  2. Install WAMP

  3. Download appropriate Oracle instant client

  4. Extract all the content of Oracle instant client and copy all the .DLL files and paste into the directory like this D:\wamp\bin\apache\Apache2.2.17\bin

  5. Turn on the WAMP server and left click on the icon > PHP > PHP extension > check the php_oci8_11g only. If you are using Oracle database older then 11g like 10g then you must check on php_oci8 only.

  6. Turn on the Oracle database 11g XE services. Also the OracleServiceORCL should be there in services.

  7. Write a PHP code to connect Oracle with database 11g XE, and save the code in www directory of WAMP server. Below is the code:

Related Topic