Introduction
The PHP extension oci8 is not part of EasyApache 4. To install the oci8 extension, you'll need to satisfy the oci8 dependencies. Once this has been installed you'll need to use pecl to install the module.
Procedure
1. Download the latest Oracle Instant Client RPMs, which are needed to satisfy all dependencies.
CloudLinux 6
rpm -Uvh https://download.oracle.com/otn_software/linux/instantclient/185000/oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/185000/oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm
CentOS/CloudLinux 7 servers
rpm -Uvh https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-devel-19.8.0.0.0-1.x86_64.rpm
If the URLs above return a 404, you'll need to visit the Oracle Instant Client Download page and update the URL accordingly.
AlmaLinux 8
rpm -Uhv https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient21/x86_64/getPackage/oracle-instantclient-devel-21.5.0.0.0-1.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient21/x86_64/getPackage/oracle-instantclient-basic-21.5.0.0.0-1.x86_64.rpm
If the URLs above return a 404, you'll need to visit the Oracle Instant Client Download page and update the URL accordingly.
2. Install the oci8 extension using pecl.
PHP 5.4 to 5.6
ea-php54-pecl install oci8-2.0.12
ea-php55-pecl install oci8-2.0.12
ea-php56-pecl install oci8-2.0.12
PHP 7.0 to 7.4
ea-php70-pecl install oci8
ea-php71-pecl install oci8
ea-php72-pecl install oci8
ea-php73-pecl install oci8
ea-php74-pecl install oci8
PHP 8.0 to 8.1
ea-php80-pecl install oci8
ea-php81-pecl install oci8
The following link provides additional information about the oci8 pecl module.
- https://pecl.php.net/package/oci8