Learn about Centmin Mod LEMP Stack today
Register Now

PHP-FPM PHP 5.7 (PHPNG) support testing for Centmin Mod betas

Discussion in 'Beta release code' started by eva2000, Jul 23, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    PHP 7 status for October 2014 - performance either matches or beats HHVM now :)


    Slides from a talk at ZendCon-2014 phpng-php7.pdf

    php7_benchmarks_00.png
    php7_benchmarks_01.png
    php7_benchmarks_02.png
    php7_benchmarks_03.png
    php7_benchmarks_04.png
    php7_benchmarks_05.png
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    More news PHP 7 moves full speed ahead | InfoWorld

     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:42 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Can't wait :)
     
  4. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    6:42 AM
    When you think we can play php 7 with centmin mod .08 beta?
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    it's already available for a few months now - see 1st post in this thread - PHP NG = PHP 7 = PHP 5.7 ;) :D

    July 2014 precisely

    edit: Just add 7.0.0 detection to centmin.sh menu option 5 as well so either 5.7.0 or 7.0.0 specified will install PHP 7.0 update inc/phpng_download.inc for PHP 7.0.0 version detection · 10fec8c · centminmod/centminmod · GitHub
     
    Last edited: Nov 2, 2014
  6. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    6:42 AM
    What should be the answer to this?
    Code:
    Auto reinstalling previously detected Zend Opcache
    *************************************************
    * Re-Installing Zend Optimizer Plus OPcache
    *************************************************
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
    -------------------------------------------------------------------
    Current PHP branch: 7.0
    Current centmin.sh set PHP_VERSION: 5.4
    Current PHP upgrade version set: 5.7
    -------------------------------------------------------------------
    
    Install which version of Zend OpCache? (version i.e. 7.0.3}):
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    answer 7.0.3 for now... although doesn't seem to matter for version as PHP 5.6+ higher compile native Zend Opcache so you will see Zend OpCache 7.04 in phpinfo...working on the proper detection later on :)

    FYI, PHP 7 doesn't support igbinary, memcache and memcached PHP extensions right now
     
  8. s.molinari

    s.molinari New Member

    10
    4
    3
    Aug 31, 2014
    Ratings:
    +4
    Local Time:
    1:42 PM
    PHP 7 is a great advancement and a needed impulse for PHP. My only other concern is the compiled size of the code. Have you seen any comparisons of PHP7 against HHVM by chance on compiled code size George? I know compile size isn't the normal person's concern, so I doubt you have found any. Still, it would be very interesting to me.;)

    Scott
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You mean the compiled size of the binary as for PHP 7 ? PHP 7 still works like PHP <7 versions
     
  10. s.molinari

    s.molinari New Member

    10
    4
    3
    Aug 31, 2014
    Ratings:
    +4
    Local Time:
    1:42 PM
    I mean the compiled size of the PHP code, once it gets through the JIT compiler. If you are running a system with a lot of PHP code, this is a serious RAM saver and thus a cost saver. :)

    Scott
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Wouldn't know myself as I haven't dug that far beyond installing and using PHP :)

    some info at PHP Fights HHVM and Zephir with PHPNG

    so PHP NG/7 isn't a JIT compiler
     
    Last edited: Nov 3, 2014
  12. s.molinari

    s.molinari New Member

    10
    4
    3
    Aug 31, 2014
    Ratings:
    +4
    Local Time:
    1:42 PM
    Hmm.. thanks for that. I could have sworn I read they were running a JIT compiler in PHP7. Maybe it will happen? I sure hope so. I would hate to need to be dependent on Facebook. ;)

    Scott
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah you might have read Sitepoint article as they corrected themselves too
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  15. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    6:42 AM
    I updated to php 7 last night on a spare Xenforo installation but with many extensions not working properly (memcache, etc), i dont think it's usuable for XF yet. Am I wrong? Do we need any of those extensions for XF?
    I reverted back to 5.6.2 but can try it again.
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    AFAIK igbinary, memcache/memcached PHP extensions not working with PHP 7 so yes for Xenforo you'd need to have disabled caching to memcached it you have - haven't tried with Xenforo myself. If you didn't specifically configure Xenforo for memcached caching, you wouldn't use those PHP extensions

    For Wordpress should work for PHP 7 minus any Memcached caching plugins. That's what I plan on doing here for testing.

    PHP 7 in its current state, might be ideal for standalone PHP scripts folks might have running ?
     
  17. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, if you're testing PHP 7, on restarting PHP-FPM you will get some PHP warnings that some PHP extensions are unable to load as PHP 7 doesn't support them. So all you need to do is delete the releveant *.ini files for them

    restart PHP-FPM
    Code:
    fpmrestart
    Gracefully shutting down php-fpm . done
    Starting php-fpm [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/geoip.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
    done
    find the paths to the *.ini files
    Code:
    php --ini 2>/devnull
    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/curlcainfo.ini,
    /etc/centminmod/php.d/custom_php.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/zendopcache.ini
    delete ones that are unable to load
    Code:
    rm -rf /etc/centminmod/php.d/geoip.ini
    rm -rf /etc/centminmod/php.d/igbinary.ini
    rm -rf /etc/centminmod/php.d/imagick.ini
    rm -rf /etc/centminmod/php.d/memcache.ini
    rm -rf /etc/centminmod/php.d/memcached.ini
    then restart PHP-FPM again

    Code:
    fpmrestart
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    Code:
    php -v
    PHP 7.0.0-dev (cli) (built: Nov  6 2014 00:54:07)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.8.0-dev, Copyright (c) 1998-2014 Zend Technologies
        with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    screenshot from my custom Centmin Mod Wordpress + Super Cache automated installer script available to Premium User members in private Premium user forums ;)

    wp_php7_00.png

    not sure if related to PHP 7 ?

    Code:
     FastCGI sent in stderr: "PHP message: PHP Warning:  Cannot use a scalar value as an array in /home/nginx/domains/domain2.com/public/wp-settings.php on line 293" while reading response header from upstream, client: 
    line 293 of wp-settings.php
    PHP:
    $GLOBALS['wp_roles'] = new WP_Roles();
    seems with PHP 7.0.0-dev WP Super Cache Advance settings are not being set properly - it's stuck on PHP caching method instead of the chosen Mod_Rewrite cache method - edit oh forgot to set do not cache for known logged in users that's why !
    Code:
    Use mod_rewrite to serve cache files. (Recommended)
    Use PHP to serve cache files.
     
    Last edited: Nov 7, 2014
  18. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    8:42 PM
    Mainline
    10.2
    My XenForo forum is using this:
    igbinary.ini
    imagick.ini
    memcache.ini
    memcached.ini

    That's the only reason I can't use PHP 7 on my Live Board :(
     
  19. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    8:42 PM
    Right off the bat, is there a need to change nginx.conf or sitename.com.conf after upgrading to php_ng?

    I noticed that running centmin mod option 5 to upgrade php to 7.0.0 immediately killed a previously working magento test install. I have not tried with wordpress
     
  20. eva2000

    eva2000 Administrator Staff Member

    54,548
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    10:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    must of missed this post

    no need to change any nginx or site nginx vhost file.. it should work with PHP 7.0.0-dev unless your site uses memcache/memcached/imagick/igbinary PHP extensions which are not yet supported in PHP 7.

    More info on PHP 7 / PHPNG's new hash table performance at PHP's new hashtable implementation | via Popist