Welcome to Centmin Mod Community
Become a Member

PHP PHP 7.4.0 GA Stable Release coming soon

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Nov 27, 2019.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    50,481
    11,664
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,092
    Local Time:
    2:24 AM
    Nginx 1.25.x
    MariaDB 10.x
    Yup PHP 7.4.0 GA stable release is due in around 24hrs time according to PHP: todo:php74. Technically, PHP 7.4.0 is already released here in their Github repo. But their official php.net announcement isn't ready yet. Just make sure your PHP web apps are compatible with PHP 7.4 before upgrading. Reminder if you find Centmin Mod LEMP stack useful, please support Centmin Mod in keeping the project alive, Ways you can support Centmin Mod.

    PHP 7.4 Benchmarks



    PHP comparison benchmarks are out for PHP 7.4.0 vs 7.3.12 vs 7.2.25 vs 7.1.33 vs 7.0.33 https://community.centminmod.com/th...-4-vs-7-3-vs-7-2-vs-7-1-vs-7-0-php-fpm.18741/


    PHP 7.4 Information


    Centmin Mod PHP 7.4.0 Support



    Centmin Mod 123.09beta01 and newer has already had PHP 7.4 support since early PHP 7.4 alpha/betas/release candidate versions.

    Example running centmin.sh menu option 5 and entering PHP version = 7.4.0 at prompt to update.

    First ensure latest local Centmin Mod 123.09beta01 code is updated via cmupdate command. Example output.
    Code (Text):
    cmupdate
    No local changes to save
    remote: Enumerating objects: 9, done.
    remote: Counting objects: 100% (9/9), done.
    remote: Compressing objects: 100% (6/6), done.
    remote: Total 9 (delta 4), reused 4 (delta 3), pack-reused 0
    Unpacking objects: 100% (9/9), done.
    From https://github.com/centminmod/centminmod
       fae171b..6c4f66b  123.09beta01 -> origin/123.09beta01
    Updating fae171b..6c4f66b
    Fast-forward
     centmin.sh             | 2 +-
     inc/php_upgrade.inc    | 4 ++--
     inc/phpng_download.inc | 6 +++---
     3 files changed, 6 insertions(+), 6 deletions(-)
    

    Run centmin.sh menu option 5 and when prompted enter PHP version = 7.4.0. I usually answer no to YUM update checks as it isn't needed and saves time.
    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):
    Do you want to run YUM install checks ?  [y/n]
    This will increase your upgrade duration time wise.
    Check the change log centminmod.com/changelog.html
    to see if any Nginx or PHP related new additions
    which require checking YUM prequisites are met.
    If no new additions made, you can skip the
    YUM install check to speed up upgrade time.
     [y/n]: n
    
    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.0RC6
    Enter PHP Version number you want to upgrade/downgrade to: 7.4.0
    Do you still want to continue? [y/n] y
    
    ----------------------------------------------------------------
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_271119-112407
    ----------------------------------------------------------------
    

    Code (Text):
    -----------------------------------------------------------------------------------------
    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
    *************************************************
    * Zend Optimizer Plus OPcache configured
    *************************************************
    PHP 7+ detected which uses newer mysqlnd
    or PDO MySQL extensions and removed the
    legacy mysql extension. You can optionally
    re-add the removed legacy mysql extension
    to PHP 7+ by answering yes to next question
    Only answer yes if you know for sure you
    have very old web scripts which need mysql
    legacy extension re-added. Otherwise answer
    no which is recommended for best stability
    Re-add legacy mysql extension to PHP 7+ [y/n] ? n
    

    At end of PHP upgrade run, you'll return to centmin.sh menu. But prior to that, the last output will be php-config output displaying PHP version and other configuration if like below:
    Code (Text):
    Usage: /usr/local/bin/php-config [OPTION]
    Options:
      --prefix            [/usr/local]
      --includes          [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib]
      --ldflags           [ -L/usr/local/lib64]
      --libs              [-lcrypt  -lc-client  -ltidy -largon2 -lresolv -lcrypt -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lbz2 -lrt -lm -ldl  -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lsqlite3 -lz -lcurl -lxml2 -lenchant -lgmodule-2.0 -lglib-2.0 -lffi -lssl -lcrypto -lz -lpng15 -lwebp -ljpeg -lXpm -lX11 -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licuio -licui18n -licuuc -licudata -lonig -lsqlite3 -ledit -ltinfo -lxml2 -lnetsnmp -lssl -lssl -lcrypto -lm -lxml2 -lsodium -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lm -lxml2 -lexslt -lxslt -lm -lgcrypt -ldl -lgpg-error -lxml2 -lzip -lssl -lcrypto -lcrypt ]
      --extension-dir     [/usr/local/lib/php/extensions/no-debug-non-zts-20190902]
      --include-dir       [/usr/local/include/php]
      --man-dir           [/usr/local/php/man]
      --php-binary        [/usr/local/bin/php]
      --php-sapis         [ cli embed fpm phpdbg cgi]
      --ini-path          [/usr/local/lib]
      --ini-dir           [/etc/centminmod/php.d]
      --configure-options [--enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --with-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --enable-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype --with-jpeg --with-png-dir=/usr --with-xpm --with-webp --with-t1lib=/usr --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --with-ldap --with-ldap-sasl --with-password-argon2=/usr/local --with-sodium=/usr/local --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --with-xsl LIBSODIUM_CFLAGS=-I/usr/local/include LIBSODIUM_LIBS=-L/usr/local/lib64 -lsodium LIBZIP_CFLAGS=-I/usr/local/include LIBZIP_LIBS=-L/usr/local/lib64 -lzip]
      --version           [7.4.0]
      --vernum            [70400]
    ***************************************************
    * PHP compiled with CPU_MARCH=haswell
    * PHP upgraded and auto reinstalled PHP extensions
    ***************************************************
    

    Exit centmin.sh menu via option 24 and then you can verify PHP 7.4.0 install via commands below
    Code (Text):
    php -v
    PHP 7.4.0 (cli) (built: Nov 27 2019 17:39:33) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies
    

    Your php ini settings files where you can use /etc/centminmod/php.d/preload.ini for your PHP 7.4's newly added Zend Opcache Preload supported settings.
    Code (Text):
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/mailparse.ini,
    /etc/centminmod/php.d/maxminddb.ini,
    /etc/centminmod/php.d/mcrypt.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/preload.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/timezonedb.ini,
    /etc/centminmod/php.d/zendopcache.ini
    

    PHP Argon2 and sodium support
    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
    

    On CentOS 7 builds PHP-FPM is built with systemd stats support so can use command shortcut = fpmstats
    Code (Text):
    fpmstats
    Processes active: 0, idle: 20, Requests: 5, slow: 0, Traffic: 0req/sec
    pool:                 www
    process manager:      static
    start time:           27/Nov/2019:17:41:40 +0000
    start since:          2622
    accepted conn:        7
    listen queue:         0
    max listen queue:     0
    listen queue len:     65535
    idle processes:       19
    active processes:     1
    total processes:      20
    max active processes: 2
    max children reached: 0
    slow requests:        0
    

    Other PHP extensions

    memcache
    Code (Text):
    php --ri memcache
    memcache
    memcache support => enabled
    Version => 4.0.4
    Revision => $Revision$
    Directive => Local Value => Master Value
    memcache.allow_failover => 1 => 1
    memcache.max_failover_attempts => 20 => 20
    memcache.default_port => 11211 => 11211
    memcache.chunk_size => 32768 => 32768
    memcache.protocol => ascii => ascii
    memcache.hash_strategy => consistent => consistent
    memcache.hash_function => crc32 => crc32
    memcache.redundancy => 1 => 1
    memcache.session_redundancy => 2 => 2
    memcache.compress_threshold => 20000 => 20000
    memcache.lock_timeout => 15 => 15
    memcache.session_prefix_host_key => 0 => 0
    memcache.session_prefix_host_key_remove_www => 1 => 1
    memcache.session_prefix_host_key_remove_subdomain => 0 => 0
    memcache.session_prefix_static_key => no value => no value
    memcache.session_save_path => no value => no value
    memcache.prefix_host_key => 0 => 0
    memcache.prefix_host_key_remove_www => 1 => 1
    memcache.prefix_host_key_remove_subdomain => 0 => 0
    memcache.prefix_static_key => no value => no value
    

    memcached
    Code (Text):
    php --ri memcached
    memcached
    memcached support => enabled
    Version => 3.1.4
    libmemcached version => 1.0.16
    SASL support => yes
    Session support => yes
    igbinary support => no
    json support => yes
    msgpack support => no
    Directive => Local Value => Master Value
    memcached.sess_locking => On => On
    memcached.sess_lock_wait_min => 150 => 150
    memcached.sess_lock_wait_max => 150 => 150
    memcached.sess_lock_retries => 5 => 5
    memcached.sess_lock_expire => 0 => 0
    memcached.sess_binary_protocol => Off => Off
    memcached.sess_consistent_hash => Off => Off
    memcached.sess_consistent_hash_type => ketama => ketama
    memcached.sess_number_of_replicas => 0 => 0
    memcached.sess_randomize_replica_read => Off => Off
    memcached.sess_remove_failed_servers => Off => Off
    memcached.sess_server_failure_limit => 0 => 0
    memcached.sess_connect_timeout => 3000 => 3000
    memcached.sess_sasl_username => no value => no value
    memcached.sess_sasl_password => no value => no value
    memcached.sess_persistent => Off => Off
    memcached.sess_prefix => memc.sess.key. => memc.sess.key.
    memcached.sess_lock_wait => not set => not set
    memcached.sess_lock_max_wait => not set => not set
    memcached.compression_type => fastlz => fastlz
    memcached.compression_factor => 1.3 => 1.3
    memcached.compression_threshold => 2000 => 2000
    memcached.serializer => php => php
    memcached.store_retry_count => 2 => 2
    memcached.default_consistent_hash => Off => Off
    memcached.default_binary_protocol => Off => Off
    memcached.default_connect_timeout => 0 => 0
    

    redis
    Code (Text):
    php --ri redis
    redis
    Redis Support => enabled
    Redis Version => 5.1.1
    Available serializers => php, json, igbinary
    Available compression => zstd
    Directive => Local Value => Master Value
    redis.arrays.algorithm => no value => no value
    redis.arrays.auth => no value => no value
    redis.arrays.autorehash => 0 => 0
    redis.arrays.connecttimeout => 0 => 0
    redis.arrays.distributor => no value => no value
    redis.arrays.functions => no value => no value
    redis.arrays.hosts => no value => no value
    redis.arrays.index => 0 => 0
    redis.arrays.lazyconnect => 0 => 0
    redis.arrays.names => no value => no value
    redis.arrays.pconnect => 0 => 0
    redis.arrays.previous => no value => no value
    redis.arrays.readtimeout => 0 => 0
    redis.arrays.retryinterval => 0 => 0
    redis.arrays.consistent => 0 => 0
    redis.clusters.cache_slots => 0 => 0
    redis.clusters.auth => no value => no value
    redis.clusters.persistent => 0 => 0
    redis.clusters.read_timeout => 0 => 0
    redis.clusters.seeds => no value => no value
    redis.clusters.timeout => 0 => 0
    redis.pconnect.pooling_enabled => 1 => 1
    redis.pconnect.connection_limit => 0 => 0
    redis.session.locking_enabled => 0 => 0
    redis.session.lock_expire => 0 => 0
    redis.session.lock_retries => 10 => 10
    redis.session.lock_wait_time => 2000 => 2000
    

    zip
    Code (Text):
    php --ri zip
    zip
    Zip => enabled
    Zip version => 1.15.5
    Libzip headers version => 1.5.2
    Libzip library version => 1.5.2
    

    imagick
    Code (Text):
    php --ri imagick
    
    imagick
    
    imagick module => enabled
    imagick module version => 3.4.4
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 6.9.10-75 Q16 x86_64 2019-11-27 https://imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 6.9.10-75 Q16 x86_64 2019-11-27 https://imagemagick.org
    ImageMagick copyright => © 1999-2019 ImageMagick Studio LLC
    ImageMagick release date => 2019-11-27
    ImageMagick number of supported formats:  => 241
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.skip_version_check => 0 => 0
    imagick.progress_monitor => 0 => 0
     
  2. eva2000

    eva2000 Administrator Staff Member

    50,481
    11,664
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,092
    Local Time:
    2:24 AM
    Nginx 1.25.x
    MariaDB 10.x
    Officially announced PHP 7.4.0 release now PHP: News Archive - 2019

     
  3. eva2000

    eva2000 Administrator Staff Member

    50,481
    11,664
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,092
    Local Time:
    2:24 AM
    Nginx 1.25.x
    MariaDB 10.x