OCI8 is a PHP support module for Oracle database
Before installing OCI8, you need to install Oracle's client library files
Instant Client package? Basic
and Instant Client package? Sdk
The most convenient way to install all the required files is to use the Oracle Instant Client, which can be obtained from here: http://www.oracle.com/technology/tech/oci/instantclient/ Instantclient.html. For the OCI8 module to work, the "basic" version of the Oracle Instant Client is sufficient. The Instant Client does not require ORACLE_SID or oracle_home environment variables to be set. But you might want to set Ld_library_path and Nls_lang.
RPM-IVH oracle-instantclient-basic-11.1.0.1-1.i386.rpm
Vi/etc/ld.so.conf.d/oracle-lib.conf
The contents are as follows
/usr/lib/oracle/11.1.0.1/client/lib
Run
Ldconfig
RPM-IVH oracle-instantclient-devel-11.1.0.1-1.i386.rpm
Determine the Apache support for Pthread
ldd/usr/sbin/httpd | grep libpthread
If not supported, you need to recompile Apache
UnixWare will not support Libpthread, but support Libthread
Enter the PHP code in the Ext/oci8 directory
/usr/local/php/bin/phpize
./configure with-php-config=/usr/local/php/bin/php-config? with-oci8=/usr/lib/oracle/11.1.0.1/client/
cp/usr/include/oracle/11.1.0.1/client/*./
Make
Make install
Copy the oci8.so to PHP extension_dir
and add support in the configuration file
FAQ:
Q:configure times wrong: Checking Oracle version ... configure:error:oracle-oci8 needed libraries not found
A:./configure with-php-config=/usr/local/php/bin/php-config? with-oci8=/usr/lib/oracle/11.1.0.1/client/
Error when Q:make
A: Missing Oracle-instantclient-devel
?