为Windows 64位配置Oracle OCI8 [英] Configuring Oracle OCI8 for windows 64 bit

查看:86
本文介绍了为Windows 64位配置Oracle OCI8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为Windows配置oracle oci8时遇到问题

I have been facing problems configuring oracle oci8 for windows

我正在使用Windows 7 64位,xampp v3.2.2,php 5.6.15和oracle g11 Express

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

我尝试了以下步骤,但是在运行phpinfo时找不到oci软件包:

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

  1. 我下载了Instant Client Package-Basic和Instant Client Package-ODBC版本12.1.0.2.0

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

将文件解压缩到c中的一个文件中,并位于以下路径(C:\instantclient_11_2)

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

将路径添加到Oracle产品(C:\instantclient_11_2;C:\oraclexe\app\oracle\product\11.2.0\server\bin;)的环境变量(path)

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

重新启动计算机

运行脚本(odbc_install)

6-删除; php.ini中extension = php_oci8_11g.dll的前面

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

但是它没有用,有人可以告诉我为什么吗?

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

推荐答案

Oracle 11g + WAMP + Windows.本教程向您展示如何将PHP与Oracle Database 11g一起使用.首先,让我们假设我正在使用Windows 7 64bit以及Oracle数据库11G和WAMP服务器,因此我已经下载了Oracle Instant Client x64.如果您使用的是32位Windows,则请下载32位客户端,否则它将无法正常工作.步骤:-

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. 安装Oracle数据库11g XE

  1. Install Oracle database 11g XE

安装WAMP

下载适当的Oracle Instant Client

Download appropriate Oracle instant client

提取Oracle Instant Client的所有内容并复制所有.DLL文件并粘贴到该目录中,如下所示:D:\ wamp \ bin \ apache \ Apache2.2.17 \ bin

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

打开WAMP服务器,然后左键单击图标> PHP> PHP扩展>仅检查php_oci8_11g.如果您使用的Oracle数据库的版本早于10g的11g,则必须仅检查php_oci8.

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.

打开Oracle数据库11g XE服务.此外,OracleServiceORCL也应存在于服务中.

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

编写一个PHP代码以将Oracle与数据库11g XE连接起来,并将代码保存在WAMP服务器的www目录中.下面是代码:

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:

这篇关于为Windows 64位配置Oracle OCI8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆