问题
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:
I downloaded both Instant Client Package - Basic and Instant Client Package - ODBC Version 12.1.0.2.0
unzip the files into one file in c to be at the following path (
C:\instantclient_11_2
)add the path to environment variable (path) for oracle product (
C:\instantclient_11_2;C:\oraclexe\app\oracle\product\11.2.0\server\bin;
)restart my computer
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?
回答1:
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 :-
Install Oracle database 11g XE
Install WAMP
Download appropriate Oracle instant client
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
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.
Turn on the Oracle database 11g XE services. Also the OracleServiceORCL should be there in services.
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:
来源:https://stackoverflow.com/questions/34927067/configuring-oracle-oci8-for-windows-64-bit