Requirements
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.
Note:
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.
Note:
If your web server doesn't start or crashes at startup
Check that Apache is linked with the pthread library:
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.