OCI8 extension is very useful for access Oracle databases. This can be linked with Oracle client libraries (Oracle 11, ...). OCI8 can be found the database installation or available Oracle Install client from Oracle. Also support to cross version connectivity. This post describe for PHP OCI8 linked with istant client 11.2.

We have already discussed OCI8 configuration with PHP, this is another method,

Before you can start it, we need to install several oracle environment variables for OCI8, set oracle libraries and mapping to configuration files.

Run the following commands,

# yum install php-pear php-devel zlib zlib-devel    -y

# yum groupinstall "Development Tools"   -y

# yum install bc libaio.i386 glibc.i686  -y

Download :

Download that package using pecl command or manually,
# pecl install oci8

OCI8  with .tgz format and extract,
# cd /root/

# wget http://pecl.php.net/get/oci8-2.0.8.tgz

# tar -xf oci8-2.0.8.tgz

# cd oci8-2.0.8

# phpize

Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
# ./configure --with-oci8=./configure --with-oci8=/u01/app/oracle/product/11.2.0/xe/

# make

#make install


Add this extension to php.ini configure file,
#echo extension=oci8.so > /etc/php.ini

Once you have done it, verify the module by the below command,
# php -i | grep oci8

Also can be check in phpinfo();  create a PHP file and add line,
# vim phpinfo.php

echo phpinfo();

Install PHP GD Library:
# sudo yum install php-gd
# sudo yum install  php php-mysql