How to install php in CentOS/RHEL 7 (x86_64)
PHP scripting language for creating dynamic web sites
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
Description
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers to write dynamically generated web pages. PHP also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts. The php package contains the module (often referred to as mod_php) which adds support for the PHP language to Apache HTTP Server.
Compatibility
This package is compatible with all RHEL-based distributions, including CentOS, AlmaLinux, Oracle Linux, Rocky Linux, etc.
RPMs
| Package | Size | Built | Changes |
|---|---|---|---|
| php-5.4.45-26.el7.x86_64 | 2.8 MiB | 2026-10-30 |
Danila Vershinin - php -v and phpinfo Build Provider show the package release |
| php-5.4.45-25.el7.x86_64 | 2.8 MiB | 2026-10-30 |
Danila Vershinin - port the 2015-2019 upstream 5.6 security fixes (5.6.14 to 5.6.40) that · Remi's 5.4 backports never carried (Patch700-797), among them · CVE-2016-7124 CVE-2016-7125 CVE-2016-7411 CVE-2016-7413 CVE-2016-7417 · CVE-2016-7418 CVE-2016-7129 CVE-2016-7130 CVE-2016-7131 CVE-2016-7132 · CVE-2016-9934 CVE-2016-9935 CVE-2016-10161 CVE-2017-12933 CVE-2017-11143 · CVE-2017-11145 CVE-2017-16642 CVE-2018-10546 CVE-2018-10547 CVE-2018-10548 · CVE-2018-10549 CVE-2018-14883 CVE-2018-20783 CVE-2019-9021 CVE-2019-9023 · and the bundled Oniguruma CVE-2017-9224/9226/9227/9228/9229; · full list in SECURITY.md |
| php-5.4.45-24.el7.x86_64 | 2.8 MiB | 2026-10-29 |
Danila Vershinin - complete the #81720 fix (CVE-2022-31625): pg_* parameter conversion · failure no longer frees uninitialized entries in the two remaining functions |
| php-5.4.45-23.el7.x86_64 | 2.8 MiB | 2026-10-27 |
Danila Vershinin - support a license file at /etc/getpagespeed/license.jwt |
| php-5.4.45-22.el7.x86_64 | 2.8 MiB | 2026-10-27 |
Danila Vershinin - license heartbeat sends /etc/getpagespeed/license.jwt as "token" when · present, licensing by token instead of source IP; own /etc/getpagespeed |