国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > IIS > 正文

PHP+IIS7配置OCI8鏈接Oracle 10G的方法

2024-08-29 03:11:55
字體:
供稿:網(wǎng)友

1. 下載適用于Oracle10G的 Instant Client Package 32Bit,instantclient-basic-win32-10.2.0.5.zip,(如果你是64Bit系統(tǒng),下載),解壓。

2.如果不修改系統(tǒng)PATH,那么解壓出來的9個(gè)文件,全部放到php的bin目錄下,也就是含有php二進(jìn)制文件的那個(gè)目錄下,如果有潔癖,那就改個(gè)PATH。

3.在IIS的FASTCGI下面選擇環(huán)境變量編輯 添加如下三個(gè)變量

代碼如下:
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
ORACLE_HOME=/path/to/php-bin
TNS_ADMIN=/path/to/the-location-of-tnsnames.ora-file

4.在php.ini里面把php_oci8.dll擴(kuò)展啟用

5.結(jié)束掉老的php-cgi進(jìn)程重新訪問就可以了

番外:

PHP官方對(duì)于Oracle的連接時(shí)候的一些變量有說明,這里的環(huán)境變量,除了ORACLE_HOME之類的也不是必須的,官方都有對(duì)應(yīng)的寫法,可以看說明

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的時(shí)候,如果使用完整的TNS語法或者簡略的寫法,比如8.8.8.8/abc的時(shí)候,TNS_ADMIN也不是必須的。具體的還是看官方文檔吧,不多說了。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 虞城县| 崇明县| 江西省| 怀宁县| 双峰县| 阿合奇县| 旬阳县| 鹤岗市| 奉节县| 建湖县| 新安县| 新巴尔虎左旗| 抚松县| 廉江市| 招远市| 沙洋县| 济源市| 天等县| 新乡县| 丹东市| 满城县| 兰州市| 盱眙县| 常宁市| 遂昌县| 佛坪县| 天长市| 潼南县| 崇明县| 大石桥市| 连南| 七台河市| 南部县| 区。| 九龙城区| 乌拉特后旗| 清原| 双江| 浏阳市| 松原市| 安宁市|