The easiest (by far) approach is to compile the extension using the PHP 7 sources.
- First, upgrade to PHP 7
cat /etc/redhat-release
yum groupinstall "Development Tools"
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install php70w php70w-pdo php70w-mcrypt php70w-mbstring php70w-intl php70w-devel php70w-bcmath php70w-cli php70w-odbc php70w-xml php70w-pear php70w-xdebug
php -v
- Install instaclient for Oracle Database 11g. Download files from here http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
rpm -Uvh oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm
- Download the PHP sources, matching the current PHP version installed
php -v
cd /root
mkdir src
cd src
wget http://be.php.net/distributions/php-7.0.2.tar.gz
tar xfvz php-7.0.2.tar.gz
- Compile and install the extension
cd php-7.0.2
cd ext
cd oci8
phpize
./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib
make
make install
echo extension=oci8.so > /etc/php.d/oci8.ini
php -i |grep oci
- Check the Oci8 extension is installed, and restart your PHP engine to apply changes
php -i |grep oci