安装/配置
在线手册:中文 英文
PHP手册

需求

The OCI8 extension requires Oracle 9iR2, 10g or 11g Client libraries. If the Oracle Database is on the same machine as PHP, the database software already contains the necessary libraries. When PHP is on a different machine, use the free » Oracle Instant Client libraries.

To use Oracle Instant Client, install the basic or basiclite Oracle Instant Client ZIP file or RPM package. When building PHP from source code, also install the sdk ZIP file or devel RPM package.

On Windows, the php_oci8 DLL needs client libraries from version 10gR2 or greater. In PHP 5.3 up to and including PHP 5.3.5, the php_oci8_11g DLL requires Oracle 11gR1 or greater client libraries. From PHP 5.3.6 the php_oci8_11g DLL requires Oracle 11gR2 or greater client libraries. With some versions of Instant Client you may additionally need mfc71.dll and msvcr71.dll libraries.

You should run PHP with the same, or more recent, version of the Oracle libraries that OCI8 was built with.

Note:

If OCI8 uses 9iR2 or 10g client libraries, then PHP can connect to Oracle Database 8i, 9iR2, 10g or 11g. If OCI8 uses 11g client libraries, the database can be 9iR2, 10g or 11g.

Note:

Full OCI8 feature support is only available when using the most recent versions of the client libraries and database.


安装/配置
在线手册:中文 英文
PHP手册
PHP手册 - N: 需求

用户评论:

dha at octo dot com (05-Jan-2011 12:04)

If you plan to use Oracle Internet Directory with LDAPS, you NEED to compile the php-ldap library with Oracle Support.

Also, with OID 10g I had to create a folder, reference it in the env variable $ORACLE_HOME, and copy in it three ldap message files found in my OID installation.

At the end, my $ORACLE_HOME looked like this :
ldap
  mesg
    ldapf.msb
    ldapus.msb
    ldapus.msg
   
(Note that the ldapf.msb is here because I have a french installation of OID)

To use ldaps, you will need to use ldap_connect this way :

ldap_connect(host,port,"file://path/to/wallet",walletpassword,sslauth)

Your wallet only needs to contain the CA (secure) certificate.

with sslauth being :
  1 for no ssl authentication
  32 for ssl server authentication
  64 for ssl mutual authentication