Learn about Centmin Mod LEMP Stack today
Register Now

Security PHP 8.0.12, 7.4.25 Security Update + Backported PHP 7.3.31, 7.2.34, 7.1.33, 7.0.33 & 5.6.40

Discussion in 'Centmin Mod News' started by eva2000, Oct 22, 2021.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    53,592
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    PHP has released security & bug fix updates specifically for PHP-FPM usage for PHP 8.0.12, PHP 7.4.25 (CVE-2021-21703). For Centmin Mod 123.09beta01, the security fixes have also been backported to end of life PHP 7.3.31, 7.2.34, 7.1.33, 7.0.33 and 5.6.40 EOL versions. Last year in 2020, they also changed the php.net download mirroring system they had to using a HTTPS secured CDN system (details here). The change in php.net download system, means that Centmin Mod 123.08stable and 123.09beta01 users need to update their Centmin Mod local server code BEFORE they run centmin.sh menu option 5 to update their PHP versions.

    PHP Releases


    • PHP 7.2.34 - last release in PHP 7.2 branch - no more bug fix or security updates. Centmin Mod 123.09beta01 and newer supported only. Centmin Mod 123.08stable may work but not all PHP extension routines may work so your mileage may vary.
    • PHP 7.1.33 - last release in PHP 7.1 branch - no more bug fix or security updates. Centmin Mod 123.09beta01 and newer supported only. Centmin Mod 123.08stable may work but not all PHP extension routines may work so your mileage may vary.

    PHP Change logs for


    Updating PHP On Centmin Mod LEMP Stacks


    • If you're on Centmin Mod 123.08stable and want PHP 7.1, 7.2, 7.3, 7.4 or 8.0 support, you will need to update your server from Centmin Mod 123.08stable to 123.09beta01 first. This can be done via centmin.sh menu option 23 submenu option 3 to switch Centmin Mod branches as outlined in 1st post under heading of How to switch to 123.09beta01 branch ? at Centmin Mod .09 beta branch Testing as well as official update page.
      Code (Text):
      --------------------------------------------------------
             Centmin Mod Updater Sub-Menu           
      --------------------------------------------------------
      1). Setup Centmin Mod Github Environment
      2). Update Centmin Mod Current Branch
      3). Update Centmin Mod Newer Branch
      4). Exit
      --------------------------------------------------------
      Enter option [ 1 - 4 ] 3
      --------------------------------------------------------
      
    • For Centmin Mod 123.09beta01 and newer, first update to latest version code via SSH command = cmupdate (same equivalent to centmin.sh menu option 23 submenu option 2 method). Then run centmin.sh menu option 5 to update to either PHP versions 8.0.12 or 7.4.25 . Example output from cmupdate SSH command run:
      Code (Text):
      cmupdate
      No local changes to save
      Updating 17a1389..d7b213d
      Fast-forward
       centmin-cli.sh                  |   2 +-
       centmin.sh                      |   2 +-
       inc/php_patch.inc               |  36 ++++++++++++--
       installer-latest-gitlab.sh      |   2 +-
       installer-latest.sh             |   2 +-
       installer73-gitlab.sh           |   2 +-
       installer73.sh                  |   2 +-
       installer74-gitlab.sh           |   2 +-
       installer74.sh                  |   2 +-
       installer80-gitlab.sh           |   2 +-
       installer80.sh                  |   2 +-
       patches/php/php5640-81026.patch | 432 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       patches/php/php7033-81026.patch | 430 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       patches/php/php7133-81026.patch | 429 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       patches/php/php7234-81026.patch | 400 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       patches/php/php7331-81026.patch | 396 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       16 files changed, 2130 insertions(+), 13 deletions(-)
       create mode 100644 patches/php/php5640-81026.patch
       create mode 100644 patches/php/php7033-81026.patch
       create mode 100644 patches/php/php7133-81026.patch
       create mode 100644 patches/php/php7234-81026.patch
       create mode 100644 patches/php/php7331-81026.patch
      
      
    • If you are on Centmin Mod 123.08stable and concerned about losing customisations when you upgrade to Centmin Mod 123.09beta01, read this guide on how to upgrade and keep most of your customisations at How to upgrade Centmin Mod + backing up customisations.

    Centmin Mod 123.09beta01 PHP Update Example


    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Data Transfer (TBA)
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 5
    --------------------------------------------------------
    

    Code (Text):
    PHP Upgrade/Downgrade - Would you like to continue? [y/n] y
    
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 5.6.40, 7.0.33, NGDEBUG)
    PHP 7.x/7.1.x/7.2.x/7.3.x is GA Stable but still may have broken PHP extensions.
    NGDEBUG is PHP 8.0 dev builds minus incompatible PHP extensions
    ----------------------------------------------------------------
    
    Current PHP Version: 7.4.24
    Latest PHP Version Installable: 7.4.25
    
    Enter PHP Version number you want to upgrade/downgrade to: 7.4.25
    
    Do you still want to continue? [y/n] y
    
    ----------------------------------------------------------------
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_211021-195324
    ----------------------------------------------------------------
    
    -----------------------------------------------------------------------------------------
    Detected PHP 7.4 branch.
    You can compile Zend OPcache (Zend Optimizer Plus+) support
    as an alternative to using APC Cache or Xcache cache.
    But Zend OPcache only provides PHP opcode cache and
    DOESN'T do data caching, so if your web apps such as Wordpress,
    Drupal or vBulletin require data caching to APC or Xcache,
    it won't work with Zend OPcache.
    
    -----------------------------------------------------------------------------------------
    Do you want to use Zend OPcache [y/n] ? y
    

    Code (Text):
    php -v
    PHP 7.4.25 (cli) (built: Oct 21 2021 19:56:50) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies
    

    with Argon2 hash algorithm support and libsodium PHP extension
    Code (Text):
    php -r 'print_r(get_defined_constants());' | grep -i argon
        [PASSWORD_ARGON2I] => argon2i
        [PASSWORD_ARGON2ID] => argon2id
        [PASSWORD_ARGON2_DEFAULT_MEMORY_COST] => 65536
        [PASSWORD_ARGON2_DEFAULT_TIME_COST] => 4
        [PASSWORD_ARGON2_DEFAULT_THREADS] => 1
        [PASSWORD_ARGON2_PROVIDER] => standard
        [SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13] => 1
        [SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13] => 2
        [SODIUM_CRYPTO_PWHASH_STRPREFIX] => $argon2id$
    

    Code (Text):
    php --ri sodium
    sodium
    sodium support => enabled
    libsodium headers version => 1.0.18
    libsodium library version => 1.0.18
    


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,592
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    PHP considered this security bug serious enough to make an exception for end of life PHP 7.3 branch, to release PHP 7.3.32 with the security bug fix. As such I've updated Centmin Mod 123.09beta01 to account for this, so the backported security fix patch only applies for PHP 7.3.0 to 7.3.31 and skips patching for PHP 7.3.32 https://community.centminmod.com/th...routine-for-php-7-3-32-in-123-09beta01.22093/.

    Folks on PHP 7.3 still can update Centmin Mod via cmupdate command, then run centmin.sh menu option 5 and update to PHP 7.3.32 instead.
     
Thread Status:
Not open for further replies.