Developer Services Portal v. 4.16.05
As of July 21, 2016, PHP no longer supports versions older than 5.6. By default, Red Hat/CentOS 6 install PHP 5.3.3, and Red Hat/CentOS 7 install PHP 5.4.16. This section describes how to upgrade to PHP 7.0.x.
Before you start, it is recommended that you:
- Familiarize yourself with the complete set of steps before stepping through them.
- Try the upgrade to a VM snapshot first, to ensure that you don't encounter any problems.
To upgrade to PHP 7.0.x:
- Enable the EPEL RPM repository (if not already enabled).
- First, verify whether the Extra Packages for Enterprise Linux (EPEL) RPM repository is
already enabled:
rpm -q epel-release
- If no results are returned, then enable the EPEL RPM repository.
For Red Hat 6 or CentOS 6, enter:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
For Red Hat 7 or CentOS 7, enter:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- First, verify whether the Extra Packages for Enterprise Linux (EPEL) RPM repository is
already enabled:
- Enable the IUS RPM repository (if not already enabled).
- First, verify whether the Inline with Upstream Stable (IUS) RPM repository is already
enabled:
rpm -q ius-release
- If no results are returned, then enable the IUS RPM repository.
For CentOS 6, enter:
rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
For CentOS 7, enter:
rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
For Red Hat 6, enter:
rpm -Uvh https://rhel6.iuscommunity.org/ius-release.rpm
For Red Hat 7, enter:
rpm -Uvh https://rhel7.iuscommunity.org/ius-release.rpm
- First, verify whether the Inline with Upstream Stable (IUS) RPM repository is already
enabled:
- Stop Apache:
service httpd stop
- Get a list of all installed PHP packages:
rpm -qa | grep -i php
- Remove all existing PHP RPMs, listed in step 4 above:
yum remove php php-common php-cli ...
- Install PHP 7 RPMs from the IUS repository:
yum install php70u php70u-cli php70u-pdo php70u-mysqlnd php70u-gd php70u-xml php70u-mbstring php70u-process php70u-json
- Start Apache:
service httpd start
- Confirm that the version is 7.0.x:
php --version
In addition, ensure that the following returns a list of Drush commands (and not error messages):
/usr/local/bin/drush help
- Test the results in the browser:
- Navigate your browser to the site and log in as an administrator.
- Under Reports, select Status report.
- Confirm that there are no red items pertaining to missing PHP modules.