简体   繁体   English

为Windows 64位配置Oracle OCI8

[英]Configuring Oracle OCI8 for windows 64 bit

I have been facing problems configuring oracle oci8 for windows 我一直在为Windows配置oracle oci8时遇到问题

I'm using windows 7 64 bit, xampp v3.2.2, php 5.6.15 and oracle g11 express 我正在使用Windows 7 64位,xampp v3.2.2,php 5.6.15和oracle g11 Express

I have tried the following steps but I can't find the oci package when running phpinfo: 我尝试了以下步骤,但是在运行phpinfo时找不到oci软件包:

  1. I downloaded both Instant Client Package - Basic and Instant Client Package - ODBC Version 12.1.0.2.0 我同时下载了Instant Client Package-Basic和Instant Client Package-ODBC版本12.1.0.2.0

  2. unzip the files into one file in c to be at the following path ( C:\\instantclient_11_2 ) 将文件解压缩到c中的一个文件中,并位于以下路径( 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; ) 将路径添加到oracle产品的环境变量(path)的路径( C:\\instantclient_11_2;C:\\oraclexe\\app\\oracle\\product\\11.2.0\\server\\bin;

  4. restart my computer 重新启动我的电脑

  5. run the script ( odbc_install ) 运行脚本( odbc_install

    6- removed ; 6-删除; infront of the extension=php_oci8_11g.dll in php.ini php.ini中extension = php_oci8_11g.dll的前面

but It didn't work , can anyone tell me why? 但这没有用,有人可以告诉我为什么吗?

Oracle 11g + WAMP + Windows. Oracle 11g + WAMP + Windows。 This tutorial shows you how to use PHP with Oracle Database 11g. 本教程向您展示如何将PHP与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. 首先,让我们假设我正在使用Windows 7 64bit以及Oracle数据库11G和WAMP服务器,因此我已经下载了Oracle Instant Client x64。 If you are using 32bit Windows then download 32bit client otherwise it wont work. 如果您使用的是32位Windows,则请下载32位客户端,否则它将无法正常工作。 Steps :- 脚步 :-

  1. Install Oracle database 11g XE 安装Oracle数据库11g XE

  2. Install WAMP 安装WAMP

  3. Download appropriate Oracle instant client 下载适当的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 提取Oracle Instant Client的所有内容并复制所有.DLL文件,然后粘贴到该目录中,如下所示: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. 打开WAMP服务器,然后左键单击图标> PHP> PHP扩展>仅检查php_oci8_11g。 If you are using Oracle database older then 11g like 10g then you must check on php_oci8 only. 如果您使用的是比10g还要早的11g Oracle数据库,则必须仅检查php_oci8。

  6. Turn on the Oracle database 11g XE services. 打开Oracle数据库11g XE服务。 Also the OracleServiceORCL should be there in services. OracleServiceORCL也应该存在于服务中。

  7. Write a PHP code to connect Oracle with database 11g XE, and save the code in www directory of WAMP server. 编写PHP代码以将Oracle与数据库11g XE连接起来,并将代码保存在WAMP服务器的www目录中。 Below is the code: 下面是代码:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM