How to install php-oci8 in CentOS/RHEL 7 (x86_64)
A module for PHP applications that use OCI8 databases
Install
sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm sudo yum -y install php-oci8
Description
The php-oci8 packages provides the OCI8 extension version 3.3.0 and the PDO driver to access Oracle Database. The extension is linked with Oracle client libraries 21.13 (Oracle Instant Client). For details, see Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1). You must install libclntsh.so.21.1 to use this package, provided by Oracle Instant Client RPM available from Oracle on: https://www.oracle.com/database/technologies/instant-client/downloads.html Documentation is at http://php.net/oci8 and http://php.net/pdo_oci
Compatibility
This package is compatible with all RHEL-based distributions, including CentOS, AlmaLinux, Oracle Linux, Rocky Linux, etc.
RPMs
| Package | Size | Built | Changes |
|---|---|---|---|
| php-oci8-8.3.36-7.el7.x86_64 | 151 KiB | 2026-10-24 |
Danila Vershinin - pre-generate ext/oci8/oci8_dtrace_gen.h before the parallel make: · upstream Makefile lacks the dependency edge and the build raced twice |
| php-oci8-8.3.36-4.el7.x86_64 | 150 KiB | 2026-10-24 |
Danila Vershinin - require libxml2 2.12+ at runtime: the 8.3.36-3 build, the first after the · libxml2 2.13 LTS stack landed in the main repository, linked against it and · calls xmlFreeEntity, which stock EL7 libxml2 2.9.1 does not export; without · this pin a fresh or upgrade install died with a symbol lookup error |
| php-oci8-8.3.36-3.el7.x86_64 | 150 KiB | 2026-10-24 |
Danila Vershinin - add gps_license license-presence extension, statically compiled into every · SAPI (ADR-002): phpinfo attribution section, cron.daily verdict heartbeat, · dormant guarded HTML footer tier (hard clamps to footer, fail-open to soft) |
| php-oci8-8.3.36-2.el7.x86_64 | 150 KiB | 2026-10-23 |
Danila Vershinin - Rebuild for EL7 from Remi's maintained 8.3.36-1 spec; Remi's EL7 · build stopped at 8.3.8-1, so this adds every upstream release · 8.3.9-8.3.36 (8.3.36 carries the PHP2Shell fix) · - GetPageSpeed branding: Vendor and Packager tags, php -v prints · "Built by GetPageSpeed LLC", phpinfo Build Provider (upstream hook) · - php-common requires getpagespeed-extras-release · - Package every php.d extension ini as 0644; 0600 files silently drop · OPcache and other extensions for non-root CLI · - Build intl against libicu73 on EL7, as Remi's EL7 build does · - Build ext/openssl against EL7's OpenSSL 1.0.2: xp_ssl.c lacked the · ASN1_STRING_get0_data shim that openssl.c already carries · - enable the oci8 / pdo_oci build, linked against Oracle Instant Client · 21.13 exactly like Remi's EL7 build (soname libclntsh.so.21.1; the · client is fetched at build time only and never shipped) · - BuildRequires unixODBC-devel on EL7 (no odbc.pc there) · - ext/ffi: call (strncmp) so EL7 glibc 2.17 strncmp macro does not · swallow ZEND_STRL arguments |