From 62d8f7aaaab6a5594d03f0347b506b06a5bebba1 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 1 Dec 2009 21:23:29 +0000 Subject: [PATCH] Restructure and include the configure steps git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291571 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/oci8/configure.xml | 143 +++++++++++++++++++++++++++++++---- reference/oci8/setup.xml | 118 ++++++----------------------- 2 files changed, 152 insertions(+), 109 deletions(-) diff --git a/reference/oci8/configure.xml b/reference/oci8/configure.xml index 9e66f9e460..421ee2eb8e 100644 --- a/reference/oci8/configure.xml +++ b/reference/oci8/configure.xml @@ -1,24 +1,141 @@ -
- &reftitle.install; +
- You have to compile PHP with the option - , where DIR defaults to - your environment variable ORACLE_HOME. + To enable the OCI8 extension, configure PHP with the option + , + where DIR defaults to the environment + variable ORACLE_HOME. - If you're using Oracle Instant - Client, you need to build PHP with the option - . Note - that Oracle Instant Client support first appeared in versions 4.3.11 and - 5.0.4. + If Oracle Instant + Client is used, then build PHP with the option + . For + example, . + If Instant Client is installed from ZIP files, make sure to create + the symbolic link, for example ln -s libclntsh.so.11.1 + libclntsh.so. + + + The shared option can also be used, for + example . + This indicates to build OCI8 as a shared library that can be + dynamically loaded into PHP. For the library to be loaded, + &php.ini; must include extension=oci8.so and also + the extension_dir value must be set to the + directory where oci8.so is located. + + + On Windows, uncomment the &php.ini; + line extension=php_oci8.dll when using Oracle + 10gR2 client libraries. Uncomment + extension=php_oci8_11g.dll when using Oracle 11g + client libraries. These two DLLs contain equivalent functionality + and only one may be enabled at a time. Make + sure extension_dir is set to the directory + containing the PHP extension DLLs. - Note that in OCI8 versions before 1.1 you have to use - to configure - PHP with Oracle Instant Client. + Note that Oracle Instant Client support first appeared in PHP + 4.3.11 and 5.0.4 and used the option + to + configure PHP. + + + + Before using this extension, make sure that the Oracle environment + variables are properly set for the web daemon user. These variables + should be set up + before the web-server is started. The + variables that might be needed include: + + + + ORACLE_HOME + + + + + ORACLE_SID + + + + + LD_LIBRARY_PATH + + + + + NLS_LANG + + + + + LD_PRELOAD + + + + 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. + + + Instant Client does not need ORACLE_SID + or ORACLE_HOME environment variables set. + Setting ORACLE_HOME with Instant Client can + cause installation problems. + + + If PHP is linked with libraries from + an ORACLE_HOME install, make sure the web server + user (nobody, www) has access to the libraries and initialization + files in the oracle home directory. + + + If the web server doesn't start or crashes at + startup + + Check that Apache is linked with the pthread library: + + + + + /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, then reinstall Apache: + + + + + + + + + + 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.
diff --git a/reference/oci8/setup.xml b/reference/oci8/setup.xml index 2570225158..bf2f1a6c1f 100644 --- a/reference/oci8/setup.xml +++ b/reference/oci8/setup.xml @@ -8,108 +8,34 @@
&reftitle.required; - 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. + 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, OCI8 needs client libraries from version 10gR2 or + greater. - 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. + 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. - - The most convenient way to install all the required files - is to use Oracle Instant Client, which is available from here: - &url.oracle.instant.client;. - 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: - - - - - /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: - - - - - - - - - - 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. + Full OCI8 feature support is only available when using the most + recent versions of the client libraries and database.
@@ -118,7 +44,7 @@
&reftitle.install; - &no.install; + &reference.oci8.configure;