热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

PHP+IIS7配置OCI8链接Oracle10G的方法

PHP+IIS7配置OCI8链接Oracle10G的方法-1.下载适用于Oracle10G的 InstantClientPackage32Bit,instantclient-bas

1. 下载适用于Oracle10G的 Instant Client Package 32Bit,instantclient-basic-win32-10.2.0.5.zip,(如果你是64Bit系统,下载),解压。

2.如果不修改系统PATH,那么解压出来的9个文件,全部放到php的bin目录下,也就是含有php二进制文件的那个目录下,如果有洁癖,那就改个PATH。

3.在IIS的FASTCGI下面选择环境变量编辑 添加如下三个变量

4.在php.ini里面把php_oci8.dll扩展启用

5.结束掉老的php-cgi进程重新访问就可以了

番外:

PHP官方对于Oracle的连接时候的一些变量有说明,这里的环境变量,除了ORACLE_HOME之类的也不是必须的,官方都有对应的写法,可以看说明

Common Oracle Environment Variables
NAME PURPOSE
ORACLE_HOME Contains the directory of the full Oracle Database software. Do not set this when using Oracle Instant Client as it is unnecessary and may cause installation problems.
ORACLE_SID Contains the name of the database on the local machine to be connected to. There is no need to set this if you using Oracle Instant Client, or always pass the connection parameter tooci_connect().
LD_LIBRARY_PATH Set this (or its platform equivalent, such as DYLD_LIBRARY_PATH, LIBPATH, or SHLIB_PATH) to the location of the Oracle libraries, for example $ORACLE_HOME/lib or/usr/lib/oracle/11.1/client/lib. This variable is not needed if the libraries are located by a different search mechanism, such as with ldconfig or with LD_PRELOAD.
NLS_LANG This is the primary variable for setting the character set and globalization information used by the Oracle libraries.
ORA_SDTZ Sets the Oracle session timezone.
TNS_ADMIN Contains the directory where the Oracle Net Services configuration files such as tnsnames.ora and sqlnet.ora are kept. Not needed if the oci_connect() connection string uses the Easy Connect naming syntax such as localhost/XE. Not needed if the network configuration files are in one of the default locations such as $ORACLE_HOME/network/admin or /etc.

Less frequently used Oracle environment variables include TWO_TASK, ORA_TZFILE, and the various Oracle globalization settings like NLS* and the ORA_NLS_* variables.

oci_connect的时候,如果使用完整的TNS语法或者简略的写法,比如8.8.8.8/abc的时候,TNS_ADMIN也不是必须的。具体的还是看官方文档吧,不多说了。


推荐阅读
  •  //CAUTION:Followtheconfigurationorderforsettingtheports.   //1)settingva ... [详细]
  • Windows下配置PHP5.6的方法及注意事项
    本文介绍了在Windows系统下配置PHP5.6的步骤及注意事项,包括下载PHP5.6、解压并配置IIS、添加模块映射、测试等。同时提供了一些常见问题的解决方法,如下载缺失的msvcr110.dll文件等。通过本文的指导,读者可以轻松地在Windows系统下配置PHP5.6,并解决一些常见的配置问题。 ... [详细]
  • 两种方式实现Flink异步IO查询Mysql
    如官网所描述的Flink支持两种方式实现异步IO查询外部系统http ... [详细]
  • Linux文件目录和权限
    Linux文件目录和权限前言:Linux一般将文件可存取的身份分为三个类别,分别是ownergroupothers,根据权限划分,每个目录都可以拥有相对身份的-rwx[可读可写可执 ... [详细]
  • 猪猪猫.CNWINXPSP2电脑城装机12DVD[豪华版]
    直接下载地址http:bt.jujumao.cn点击下载种子下载信息[点击浏览该文件:2007-12-19猪猪猫.cn-winxpsp2电脑城装机12豪华版.torrent]| ... [详细]
  • 【Modbus 】Modbus 协议
    Modbus协议简介Modbus协议是一项应用层报文传输协议,包括ASCII、RTU、TCP三种报文类型。标准的Modbus协议物理层接口有RS232、RS422 ... [详细]
  • hadoop完全分布式搭建
    原文链接:hadoop完全分布式搭建主机分配以及地址要求:角色主机名IP地址Namenodemaster192.168.222.201Datanodeslave ... [详细]
  • 大数据学习环境安装关于防火墙​centos7使用的是firewalld,centos之前使用的是iptablesCentOS7关闭防火墙查看防火墙状态sudosy ... [详细]
  • 简单理解rsa的加密和签名PHP实现
    我们先动手在linux上生成一下rsaPs:openssl是一堆加密算法和安全协议的开源集合,像RSA,DES,MD5,RC4等等,都能在openssl里面找到源代码 ... [详细]
  • 1、为什么要对nginx平滑升级随着nginx越来越流行,并且nginx的优势也越来越明显,nginx的版本迭代也来时加速模式,1.9. ... [详细]
  • DimcnAsNewADODB.ConnectionDimcmdAsNewADODB.CommandDimrstAsNewADODB.Recordsetcn.Mod ... [详细]
  • Docker基础和常用命令详解_docker
    这篇文章主要介绍了Docker基础和常用命令方法的相关资料, ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文介绍了在Windows环境下如何配置php+apache环境,包括下载php7和apache2.4、安装vc2015运行时环境、启动php7和apache2.4等步骤。希望对需要搭建php7环境的读者有一定的参考价值。摘要长度为169字。 ... [详细]
author-avatar
拍友2502911223
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有