downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Инсталация> <Инсталиране/Конфигуриране
[edit] Last updated: Fri, 18 Sep 2009

view this page in

Изисквания

You will need the Oracle client libraries to use this extension. Windows users will need libraries with version at least 10 to use the php_oci8.dll.

Забележка: This extension does not support Oracle 8 client libraries anymore. Though you still can connect to Oracle 8 servers as long as the client library (v.9+) supports this.

The most convenient way to install all the required files is to use Oracle Instant Client, which is available from here: » http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html. To work with OCI8 module "basic" version of Oracle Instant Client is enough. Instant Client does not need ORACLE_SID or ORACLE_HOME environment variables set. You still may need to set LD_LIBRARY_PATH and NLS_LANG, though.

Before using this extension, make sure that you have set up your Oracle environment variables properly for the Oracle user, as well as your web daemon user. These variables should be set up before you start your web-server. The variables you might need to set are as follows:

  • ORACLE_HOME
  • ORACLE_SID
  • LD_PRELOAD
  • LD_LIBRARY_PATH
  • NLS_LANG

For less frequently used Oracle environment variables such as TNS_ADMIN, TWO_TASK, ORA_TZFILE, and the various Oracle globalization settings like ORA_NLS33, ORA_NLS10 and the NLS_* variables refer to Oracle documentation.

After setting up the environment variables for your web server user, be sure to also add the web server user (nobody, www) to the oracle group.

Забележка: If your web server doesn't start or crashes at startup
Check that Apache is linked with the pthread library:

# ldd /www/apache/bin/httpd
   libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000)
   libm.so.6 => /lib/libm.so.6 (0x4002f000)
   libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000)
   libdl.so.2 => /lib/libdl.so.2 (0x4007a000)
   libc.so.6 => /lib/libc.so.6 (0x4007e000)
   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


If the libpthread is not listed you have to reinstall Apache:

# cd /usr/src/apache_1.3.xx
# make clean
# LIBS=-lpthread ./config.status
# make
# make install


Please note that on some systems, like UnixWare it is libthread instead of libpthread. PHP and Apache have to be configured with EXTRA_LIBS=-lthread.



add a note add a note User Contributed Notes Изисквания
dha at octo dot com 05-Jan-2011 04: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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites