Wondering how to enable Oracle OCI8 extensions for Plesk PHP 7? We can help you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team help a customer deal with this Plesk issue.
How to enable Oracle OCI8 extensions for Plesk PHP 7?
The OCI8 extension can add to an existing PHP installation by using the DLLs from » PECL repository or the libraries in your PHP installation’s ext directory.
The OCI8 extension lets you access Oracle Database.
1. Firstly, 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_642. Then, download
andoracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpmfrom Oracle OTN and upload it on the server.oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm3. Next, install oracle-instantclient12* packages:
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.rpm4. Install oci8 package with pecl
/opt/plesk/php/7.0/bin/pecl install oci8-2.2.05. Finally, enable oci8 module in php.ini
echo "extension=oci8.so" > /opt/plesk/php/7.0/etc/php.d/oci.iniTo install oci8 extension for other PHP engines installed via Plesk Installer, install PHP devel package for corresponding PHP version. For example, for PHP 7.2:
yum install plesk-php72-develNote: That gcc, glibc-devel and other packages already installed on the Step 1
Repeat steps 4,5 from the above, just make sure that path is for the current PHP version:
/opt/plesk/php/7.2/bin/pecl install oci8-2.2.0echo "extension=oci8.so" > /opt/plesk/php/7.2/etc/php.d/oci.iniCheck that extension is enabled:
/opt/plesk/php/7.2/bin/php -m | grep ocioci8
[Need a solution to another query? We are just a click away.]
Conclusion
Today, we saw steps followed by our Support Engineers to enable Oracle OCI8 extension.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.