Oci8 is used for connect to an Oracle database, so you  want to install Apache,MySQL and PHP in your Oracle server,

Yum install httpd*
yum install mysql*
Download the PHP

Extract the PHP
tar xvf php-5.4.29.tar.bz2

Next, set the Oracle home path and configure oci8 in  PHP
#  export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe

# cd php-5.4.29

#  ./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/bin/ --with-libdir=lib64 --prefix=/usr/share/php --with-config-file-path=/usr/share/php --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext --with-gdbm --with-oci8=$ORACLE_HOME


#make install

Once the installation has been done you can check the version whether is configured in your PHP
#php –I | grep oci8

or You can check with phpinfo();

I have faced two errors while installing oracle, That errors and solutions given below,

ERROR: php configure: cannot find libmysqlclient

./configure --with-mysql=/usr/bin/ --with-libdir=lib64

ERROR : configure: error: DBA: Could not find necessary header file(s)  Solution:

yum install gdbm-devel