IAMEM Hosting

Install PHP OCI8 extension to connect to remote Oracle Databases

Home > Blog > cPanel > Install PHP OCI8 extension to connect to remote Oracle Databases
13Feb, 2017
0

Install PHP OCI8 extension to connect to remote Oracle Databases

Installtion on EasyApache 3:

1. Install Oracle Instaclient Basic and Devel packages from here

[[email protected] ~]# rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
Preparing...                ########################################### [100%]
        package oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64 is installed



[[email protected] ~]# rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
Preparing...                ########################################### [100%]
        package oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm is installed

2. Download OCI8 package

wget -4 https://pecl.php.net/get/oci8-2.0.5.tgz

3. Untar the archive

tar -xvf oci8-2.0.5.tgz

cd oci8*

4. Compile the package

phpize
./configure --with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib/

5. Edit php.ini

echo "extension=oci8.so" >> /usr/local/lib/php.ini

6. Restart Webservice

/scripts/restartsrv_apache

 

Leave a Reply

fourteen − 13 =

Copyright © 2019 | iamemhost.com . All rights reserved.