PHP+IIS7 Configure OCI8 to link Oracle 10G _win server

Source: Internet
Author: User
Tags oracle database

1. Download applicable to oracle10g Instant Client Package 32bit,instantclient-basic-win32-10.2.0.5.zip, (if you are 64Bit system, download), unzip.

2. If you do not modify the system path, then extract the 9 files, all put into the bin directory of PHP, that is, the directory containing PHP binaries, if a neat, then change path.

3. Under the fastcgi of IIS, select environment variable edit Add the following three variables

Copy Code code as follows:

Nls_lang=simplified Chinese_china. Zhs16gbk
Oracle_home=\path\to\php-bin
Tns_admin=\path\to\the-location-of-tnsnames.ora-file

4. php_oci8.dll extension Enabled in php.ini

5. The end of the old php-cgi process can be accessed again

Out of the pan:

PHP official connection to the oracle of some variables are explained here, the environment variables, in addition to oracle_home and other things are not necessary, the official has a corresponding writing, you can see the explanation

Common Oracle Environment Variables
NAME Purpose
Oracle_home Contains the directory of the full Oracle Database software. Do not set the When using Oracle Instant Client as it are unnecessary and may cause installation problems.
Oracle_sid Contains the name of the database on the local machine to is connected to. There is no need to set this if you are using Oracle Instant Client, or always pass the connection parameter ().
Ld_library_path Set this (or it platform equivalent, such as Dyld_library_path, LIBPATH, or Shlib_path) to the location of the Oracle Lib Raries, for example $ORACLE _home/lib or/usr/lib/oracle/11.1/client/lib. This variable isn't 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" character set and globalization information by the Oracle used.
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. Not needed if the Oci_connect () connection string uses the Easy connect naming syntax as such. Not needed if the network configuration files are in one of the default locations such as $ORACLE _home/network/admin or/e Tc.

Less frequently used Oracle environment variables include Two_task, Ora_tzfile, and the various Oracle globalization Setti NGS like nls* and the ora_nls_* variables.

When

Oci_connect, the tns_admin is not necessary if you use the full TNS syntax or the abbreviated wording, such as 8.8.8.8/ABC. The concrete or the official document, don't say more.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.