Document toolboxDocument toolbox

PHP 7.2 Install

IMPORTANT: These instruction are only for a new server installation or those who wish to remove the previous version of PHP and run ONLY PHP 7.2 on the server.

If you are upgrading a server to PHP 7.2, and still need to be able to run a previous version of PHP, please see the PHP 7.2 Upgrade Instructions

Additionally, REDHAT 8 does not auto configure php-fpm as it does in previous versions, so for REDHAT 8, the upgrade instructions should be used: PHP 7.2 Upgrade

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

NameDescription
php72-php-processDynamic 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-apcuAPC 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-mbstringDynamic 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-pdoDynamic 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-zipLibrary for processing zip files

Optional PHP Modules

NameDescription
php72-php-mysqlnd
MySQL Support
php72-php-oci8
Oracle Support
php72-php-ldap
LDAP Support

Required Packages


NameDescription
php72The PHP 7.2 Package
php72-phpPHP 7.2 Apache Module

Install Process


  1. Remove any previous versions of PHP 

    yum -y remove php*
  2. Instal EPEL and Remi-Safe repositories. Install Yum Utils.

    # RedHat 6 or CentOS 6
    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-6.rpm yum-utils
    
    # RedHat 7 or CentOS 7
    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum-utils
  3. Set the PHP Version to 7.2 

    yum-config-manager --enable remi-php72
  4. Update all currently installed packages 

    yum -y update
  5. Install PHP 7.2 

    yum -y install php72 php72-php
  6. Make a symbolic link so that php = php72 

    ln -s /usr/bin/php72 /usr/bin/php
  7. Edit the php.ini file. This will typically be located at /etc/opt/remi/php72/php.ini. The following lines need to be updated: 


  8. # Set max memory to 1 Gb
    memory_limit = 1024M
    
    Set the max file upload size to 10 Megabytes
    upload_max_filesize = 10M
    
    # This would need to be set to the timezone in which the Server is located
    date.timezone = America/Detroit 
  9. Install the PHP modules required by PCR-360 

    yum -y install php72-php-process php72-php-xml php72-php-pecl-apcu php72-php-gd php72-php-intl php72-php-mbstring php72-php-pecl-mcrypt php72-php-pdo php72-php-soap php72-php-pecl-zip
  10. Install installation dependant Packages. These will depend on how the server is configured. 

    # MySql support
    yum -y install php72-php-mysqlnd
    
      
    # LDAP Support
    yum -y install php72-php-ldap


  11. Install OCI8 Support ONLY if this is an Oracle Load:
    1. Support for this will require you Update the Oracle Instant Client to at at least version 18.1

    2. You will likely need to remove previous versions of SQL Plus 

      # This command will vary depending on the version installed 
      rpm -e oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_6
    3. Start Here: Instant Client Install

    4. /wiki/spaces/PCRIN/pages/17266319hen install the PHP72 Mod

      # Oracle Support
      yum -y install php72-php-oci8
  12. Verify that PHP 7.2 is installed. 

    php -v
    
    PHP 7.2.12 (cli) (built: Nov  6 2018 15:26:22) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies



Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242