Join the community today
Become a Member

PHP PHP 8.0.0 GA Stable Release

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

  1. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    PHP folks have officially announced the release of PHP 8.0.0 GA stable release. Centmin Mod 123.09beta01 latest update has added support for PHP 8.0.0 based php-fpm. So you can run cmupdate command to update 123.09beta01 on your servers and then run centmin.sh menu option 5 to enter at prompt PHP version = 8.0.0 to update.

    PHP 8 is faster especially with JIT enabled - older benchmarks I did ~8 months ago for PHP 8.0 vs 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0 at https://community.centminmod.com/th...s-7-2-vs-7-1-vs-7-0-php-fpm.18741/#post-79730

    [​IMG]

    [​IMG]


    [​IMG]

    However, not all PHP extensions would be supported initially for PHP 8.0.0 so PHP web app compatibility may vary. Make sure your PHP scripts are PHP 8 compatible first. You can do that via setting up a test VPS server with Centmin Mod 123.09beta01 and PHP 8.0.0. PHP folks have a PHP 8.0 migration guide at PHP: Migrating from PHP 7.4.x to PHP 8.0.x - Manual

    One relevant new PHP 8 option for PHP-FPM is pm.status_listen that I will need to add into Centmin Mod 123.09beta01's PHP 8 upgrade routine.
    Code (Text):
    php -v
    PHP 8.0.0 (cli) (built: Nov 25 2020 13:24:32) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.0, Copyright (c), by Zend Technologies
    

    Code (Text):
    php-config
    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 -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lbz2 -lutil -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 -largon2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lexslt -lxslt -lxml2 -lzip -lz -lssl -lcrypto -lcrypt ]
      --extension-dir     [/usr/local/lib/php/extensions/no-debug-non-zts-20200930]
      --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 PKG_CONFIG_PATH=/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig:/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig ICU_CFLAGS=-I/usr/include ICU_LIBS=-L/usr/lib64 -licuio -licui18n -licuuc -licudata 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           [8.0.0]
      --vernum            [80000]
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, Wordpress 5.5 doesn't support PHP 8 as yet. Wordpress 5.6 is meant to support PHP 8 when it is released :)

    Xenforo 2.2.2 next release will also support PHP 8 :D
     
  3. Jon Snow

    Jon Snow Active Member

    795
    159
    43
    Jun 30, 2017
    Ratings:
    +236
    Local Time:
    1:52 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    I'm likely going to wait a bit longer before I even consider upgrading.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Like previous PHP 8.0 vs 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0 benchmarks, redid them with latest versions below including PHP 8.0.0 with and without JIT and comparing it with Centmin Mod PHP-FPM with/without Profile Guided Optimizations and Remi YUM Repo versions :)

    Looks like Centmin Mod PHP 7.4.13 with PGO enabled is as fast as PHP 8.0.0 for bench.php and micro_bench.php and faster than PHP 8.0.0 non-PGO/JIT for detailed_benchmark.php :)

    PHP 8 JIT setting for opcache.jit was set to 1235 where default is 1254 consisting of 4 decimal digits - CRTO.

    O (optimization level)
    • 0: No JIT.
    • 1: Minimal JIT (call standard VM handlers).
    • 2: Inline VM handlers.
    • 3: Use type inference.
    • 4: Use call graph.
    • 5: Optimize whole script.
    T (trigger)
    • 0: Compile all functions on script load.
    • 1: Compile functions on first execution.
    • 2: Profile functions on first request and compile the hottest functions afterwards.
    • 3: Profile on the fly and compile hot functions.
    • 4: Currently unused.
    • 5: Use tracing JIT. Profile on the fly and compile traces for hot code segments.
    R (register allocation)
    • 0: Don't perform register allocation.
    • 1: Perform block-local register allocation.
    • 2: Perform global register allocation.
    C (CPU-specific optimization flags)
    • 0: Disable CPU-specific optimization.
    • 1: Enable use of AVX, if the CPU supports it.

    phpbenchmarks-bench-01.png

    phpbenchmarks-micro-bench-01.png


    phpbenchmarks-detailed-benchmarkh-01.png
     
    Last edited: Dec 1, 2020
  5. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    1:52 AM
    Mainline
    10.2
    Not sure how to configure those things?
    Any guide? :)
    Thanks.
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You wouldn't need to configure it as default is tracking mode = 1254 but it's with opcache.jit PHP setting. You can customise via custom PHP .ini settings file. For custom php settings read centminmod.com/phpfpm.html#customphpini. You might want to create /etc/centminmod/php.d/b_customphp.ini to override centmin mod defaults at /etc/centminmod/php.d/a_customphp.ini and restart PHP-FPM. Such changes will persist when doing centmin mod upgrades. Also outlined in Getting Started Guide Step 17.

    So for me
    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/imagick.ini,
    /etc/centminmod/php.d/mailparse.ini,
    /etc/centminmod/php.d/maxminddb.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/mysqlnd.ini,
    /etc/centminmod/php.d/preload.ini,
    /etc/centminmod/php.d/timezonedb.ini,
    /etc/centminmod/php.d/zendopcache.ini,
    /etc/centminmod/php.d/zz-zendopcache.ini,
    /etc/centminmod/php.d/zzz-mailxheader.ini
    

    I created /etc/centminmod/php.d/zz-zendopcache.ini to override default Zend Opcache settings set in /etc/centminmod/php.d/zendopcache.ini
     
  8. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    9:52 AM
    @eva2000 in case I want to install PHP 8.0 for new installation, any one line command like below or just use
    PHP_VERSION='8.0.0' in custom_config?
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller73.sh && chmod 0700 betainstaller73.sh && bash betainstaller73.sh
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I haven't added PHP 8.0 default install option yet. It will come after I have had time to test such :)
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    7:52 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    New mcrypt version is out with support for Php 8 :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    cheers just updated 123.09beta01 with mcrypt PHP 8.0 extension support :)

    Code (Text):
    php -v 
    PHP 8.0.0 (cli) (built: Dec  4 2020 10:41:57) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.0, Copyright (c), by Zend Technologie
    

    Code (Text):
    php --ri mcrypt           
    mcrypt
    mcrypt support => enabled
    mcrypt_filter support => enabled
    Version => 2.5.8
    Api No => 20021217
    Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes 
    Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream 
    Directive => Local Value => Master Value
    mcrypt.algorithms_dir => no value => no value
    mcrypt.modes_dir => no value => no value
    
     
  12. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    6:52 PM
    Is php 8 compatible with igbinary and redis? I get error 500 in xenforo 2.2.2 with Xon redis addon, but if i disable cache its ok :confused:
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: Dec 5, 2020
  14. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    6:52 PM
    I will test again (y)
     
  15. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    7:52 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes i think Igbinary may needed for Invision also :)
     
  16. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    6:52 PM
  17. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    1:52 AM
    1.15.x
    MariaDB 10.3.x
    XF2.2+php8 has broken push notifications, and I'm sure add-ons require updating as well
     
  18. eva2000

    eva2000 Administrator Staff Member

    53,818
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    3:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what is igbinary used for in Invision? newer PHP 7+ and 8 native serialization performance is up there so igbinary isn't really that useful AFAIK.
    Glad to hear :)
    Cheers mate, looks like it will be a busy December holiday season for addon developers :D
     
  19. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    12:52 PM
    I'm a little out of the loop. Centmin option 5 to upgrade to php 8?
     
  20. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    7:52 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    First run cmupdate and then from menu 5 select version 8.0.0 but first check that your platform and addons or any custom code support it :)