Monday, 07 February 2011 14:52

Enabling PHP with Oracle Support with oci8 in CentOS 5.5

Written by 
Rate this item
(9 votes)

This is the procedure in installing oci8 support to a CentOS 5.5 x86_64 assuming you are already have Apache and PHP installed beforehand.

1. Download oracle instant client (basic and devel) from :

2. Install the basic and development package.

[root@ptm ] rpm -Uvh oracle-instantclient-basic-<VERSION>.x86_64.rpm
[root@ptm ] rpm -Uvh oracle-instantclient-devel-<VERSION>.x86_64.rpm

3. Link the installation dynamically

[root@ptm ] echo /usr/include/oracle/<VERSION>/client/lib/ > /etc/
[root@ptm ] ldconfig -v

4. Download oci8 package  from :

5. Extract and install the package

[root@ptm oci8-1.4.5] phpize
[root@ptm oci8-1.4.5] ../configure -with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib/
[root@ptm oci8-1.4.5] make
[root@ptm oci8-1.4.5] make install

6.  Add the library shared object for PHP

[root@ptm oci8-1.4.5] echo > /etc/php.d/oci8.ini

7. restart Apache

8. In phpinfo should now see that oci8 support is now enabled.

Note : This instruction is adapted from :

Read 19305 times Last modified on Tuesday, 08 February 2011 08:29
Login to post comments
You are here