(2024.1) PHP 7.2 Upgrade
IMPORTANT: These instructions are only for upgrade installations only. If you are installing a new server, or do not want to run PHP 7.2 alongside an older version please see the PHP 7.2 Install Instructions
Additionally, REDHAT 8 does not auto configure php-fpm as it does in previous versions, so for REDHAT 8, these instructions should be used:
Note to Licensed Customers:
The following information represents the process we use to upgrade hosted installations.
The repos may vary depending the installation.
Licensed customers are welcome to use any repos they deem appropriate.
All modules listed under "Install the PHP modules required by PCR-360 " are required for PCR-360 to function correctly.
The only optional modules are the installation-specific modules listed below the required ones.
Zend Guard Loader is not supported in PHP 7.2, is not included in the required modules, and may be safely removed.
MCrypt has been deprecated in PHP 7.2, but is still available as an addon module.
In PCR-360 version 2019.1, we will be removing the usage of MCrypt in favor of OpenSSL encryption. For version 2018.1, MCrypt is still a required module.
Required PHP Modules
Name | Description |
---|---|
php72-php-process | Dynamic shared objects which add support to PHP using system interfaces for inter-process communication. |
php72-php-xml | Dynamic shared objects which add support to PHP for manipulating XML documents using the DOM tree, and performing XSL transformations on XML documents. |
php72-php-pecl-apcu | APC Caching Support |
php72-php-gd | Dynamic shared object that will add support for using the gd graphics library to PHP. |
php72-php-intl | Dynamic shared object that will add support for using the ICU library to PHP. |
php72-php-mbstring | Dynamic shared object that will add support for multi-byte string handling to PHP |
php72-php-pecl-mcrypt | Deprecated, but still currently required. Support for the mcrypt encryption API. |
php72-php-pdo | Dynamic shared object that will add a database access abstraction layer to PHP. This module provides a common interface for accessing MySQL, PostgreSQL or other databases. |
php72-php-soap | Dynamic shared object that will add support to PHP for using the SOAP web services protocol. |
php72-php-pecl-zip | Library for processing zip files |
Optional PHP Modules
Name | Description |
---|---|
php72-php-mysqlnd | MySQL Support |
php72-php-oci8 | Oracle Support |
php72-php-ldap | LDAP Support |
Required Packages
Name | Description |
---|---|
php72 | The PHP 7.2 Package |
php72-php-fpm | PHP 7.2 FPM Service |
mod_proxy_fcgi | Apache Proxy Mod |
Upgrade Process
Update all packages
yum update
In some cases you may see this error:
The GPG keys listed for the "Percona-Release YUM repository - noarch" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository.
To resolve, manually edit the repo file:
vim /etc/yum.repos.d/percona-release.repo # change all instances of gpgcheck = 1 # to gpgcheck = 0 # save and close the file, then try to update again
Reboot the server:
Make sure the EPEL repo is installed and active
The following file should exist:
and contain the section [epel] with the value enabled=1
If not, install the repo
Install the remi-safe repo:
Install PHP 7.2, FPM for PHP 7.2, and the Apache FPM Mod
Edit the php.ini file. This will typically be located at /etc/opt/remi/php72/php.ini. The following lines need to be updated:
Install the PHP modules required by PCR-360
If you experience an issue with installing dependencies for the Modules, you will either need to compile them yourself, or install the centos repo:
Install OCI8 Support ONLY if this is an Oracle Load:
Support for this will require you Update the Oracle Instant Client to at at least version 18.1
You will likely need to remove previous versions of SQL Plus
Start Here: Instant Client Install
Then install the PHP72 Mod
The defaults settings for PHP-FPM should be ok, but if you need to change anything (i.e. listening port), the config can be found at:
The default listening port may be changed at the following line
Edit the Virtual Host configuration. This is generally located in the default Virtual Hosts directory:
For Apache Version 2.2, two new directives need to be added:
The placement of the new lines is especially important in Shibboleth configurations
Just below the <Directory> directive, add the <Location> directive
Just below the newly added <Location> directive, add the ProxyPassMatch
For Apache Version 2.4
Tell PHP-FPM to listen to the socket. Edit /etc/opt/remi/php72/php-fpm.d/www.conf and change the line listen= ... to:
Find the listen.owner / .group / .mode lines and un-comment them. Also, change the user & group to whatever Apache runs as (usually "apache").
Declare the proxy in a separate .conf file so we can re-use it. i.e. /etc/httpd/conf.d/php72.conf
Edit the PCR360 <VirtualHost> and add the <FilesMatch> & SetHandler:
Start the FPM service
Verify the the service is listening on the configured port (default is 9000).
Enable the FPM service. Restart Apache and PHP
The application code can now be updated to version 2018.1+