How to enable Oracle OCI8 extensions for Plesk PHP 7

Created:

2016-11-16 13:19:03 UTC

Modified:

2017-08-08 13:11:10 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to enable Oracle OCI8 extensions for Plesk PHP 7

Applicable to:

  • Plesk 12.5 for Linux

Question

How to enable Oracle OCI8 extensions for Plesk PHP 7

Answer

  • Install devel packages required to build custom PHP 7 modules

    # yum install plesk-php70-devel gcc glibc-devel libmemcached-devel zlib-devel make libaio.x86_64
  • Download oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm and oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm from Oracle OTN and install them

    # rpm -Uhv oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
  • Install oci8 package with pecl

    # /opt/plesk/php/7.0/bin/pecl install oci8
  • Enable oci8 module in php.ini

    # echo "extension=oci8.so" > /opt/plesk/php/7.0/etc/php.d/oci.ini
Have more questions? Submit a request
Please sign in to leave a comment.