a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 數據庫 > Oracle > 正文

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

2019-11-02 16:10:06
字體:
來源:轉載
供稿:網友

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下面選擇環境變量編輯 添加如下三個變量

復制代碼 代碼如下:

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擴展啟用

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也不是必須的。具體的還是看官方文檔吧,不多說了。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 亚洲涩涩爱 | 成人一级| 久久99精品国产麻豆婷婷洗澡 | 一级视频毛片 | 日韩在线免费 | 一级毛片免费视频 | 国产亚洲tv | 亚洲精品乱码久久久久久蜜桃不卡 | 欧美精品一区二区三区视频 | 国产福利91精品一区二区三区 | 日韩精品一区二区三区视频播放 | 精品久久网站 | 欧美色视频在线观看 | 中文字幕日本在线 | 久久亚洲视频 | 五月婷婷激情 | 五月婷婷在线视频观看 | 亚洲成人久久久 | 黄色av网站在线免费观看 | 久久成人综合网 | 欧美日韩精品久久久久 | 激情国产 | 国产精品久久久久久久久久 | 九九综合九九综合 | 超碰网址 | t66y最新地址一地址二69 | 绯色av一区二区三区在线观看 | 国产一区二区三区四区视频 | 国产日韩欧美一区 | 久久综合久久久 | 成人久久亚洲 | 四虎影院在线免费播放 | 久久久久久毛片 | 精品99久久久久久 | 99re在线视频 | 欧美视频在线观看一区 | 亚洲欧洲日韩 | 三级性视频 | 色黄网站 | 国产情侣免费视频 | 欧美1级 |