Discover Centmin Mod today
Register Now

PHP PHP 7.0.0RC releases + Centmin Mod Updating PHP-FPM

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Aug 20, 2015.

  1. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    4:27 AM
    nginx
    10.3.x
    Is there a way I could change centmin so that is uses the phpredis branch that supports PHP7?


    Liam
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    not easily.. i was thinking about switching to that branch but thought i'd wait for it to be merged into main branch seeing as PHP 7 is close to final release

    i'd probably wait as PHP 7.0.0 GA final requires centmin mod code updates so that version number 7.0.0 uses GA final code instead of PHP 7 master git dev branch anyway.

    and there's still bugs even in PHP 7 branch for php redis extension https://github.com/phpredis/phpredis/issues?utf8=✓&q=php+7

    i.e. Fix segmentation fault on PHP 7.0.0RC5 by ephemeralsnow · Pull Request #676 · phpredis/phpredis · GitHub
     
  3. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    4:27 AM
    nginx
    10.3.x
    I was going to, but they pushed it back, and I'm super impatient so...

    Liam
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    well PHP 7.0.0 RC7 released PHP: News Archive - 2015

    Code:
    12 Nov 2015, PHP 7.0.0 RC 7
    
    - Core:
      . Fixed bug #70249 (Segmentation fault while running PHPUnit tests on
        phpBB 3.2-dev). (Laruence)
      . Fixed bug #70805 (Segmentation faults whilst running Drupal 8 test suite).
        (Dmitry, Laruence)
      . Fixed bug #70842 (Persistent Stream Segmentation Fault). (Caleb Champlin)
      . Fixed bug #70862 (Several functions do not check return code of
        php_stream_copy_to_mem()). (Anatol)
      . Fixed bug #70863 (Incorect logic to increment_function for proxy objects).
        (Anatol)
      . Fixed bug #70323 (Regression in zend_fetch_debug_backtrace() can cause
        segfaults). (Aharvey, Laruence)
      . Fixed bug #70873 (Regression on private static properties access).
        (Laruence)
    
    - OCI8:
      . Fixed bug #68298 (OCI int overflow) (Senthil).
    
    - Opcache:
      . Fixed bug #70656 (require() statement broken after opcache_reset() or a
        few hours of use). (Laruence)
      . Fixed bug #70843 (Segmentation fault on MacOSX with
        opcache.file_cache_only=1). (Laruence)
    
    - PDO:
      . Fix bug #70861 (Segmentation fault in pdo_parse_params() during Drupal 8
        test suite). (Anatol)
    
    - Session:
      . Fixed bug #70876 (Segmentation fault when regenerating session id with
        strict mode). (Laruence)
    
    - SOAP:
      . Fixed bug #70875 (Segmentation fault if wsdl has no targetNamespace
        attribute). (Matteo)
    
    - SPL:
      . Fixed bug #70853 (SplFixedArray throws exception when using ref variable
        as index). (Laruence)
      . Fixed bug #70868 (PCRE JIT and pattern reuse segfault). (Laruence)
    
    - Standard:
      . Fixed bug #70808 (array_merge_recursive corrupts memory of unset items).
        (Laruence)
    
    - XSL:
      . Fixed bug #70678 (PHP7 returns true when false is expected). (Felipe)
     
  5. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:27 PM
    Mainline
    10.2
    PHP Redis for PHP7 please :).
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    11:27 PM
    latest
    10
    Is this available for an upgrade on CM 08 Stable?
    Like Roldan, Looking forward to Redis!
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    pretty much should work although 123.09 beta01 has a few extra bits of code in PHP extensions and PHP 7 alpha/beta/rc check routines than 123.08stable.
     
    Last edited: Nov 13, 2015
  9. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    12:27 PM
    1.15.x
    MariaDB 10.3.x
    You don't need phpredis extension. From testing the performance improvements from PHP7 with XenForo, even with the pure php version of the redis client lib works quite well.

    That said, the extension should still have performance benefits to having it once it works properly.
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    pure php version of redis ?
     
  11. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    12:27 PM
    1.15.x
    MariaDB 10.3.x
    Redis client library. Not Redis itself.

    My XF Redis caching add-on uses a client library which can use phpredis or a pure php implementation to communicate with a Redis server.
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    i see, i thought PHP needed a Redis PHP extension/client for PHP Redis to talk with Redis server ? You mean you can just natively code PHP to talk with Redis server ?
     
  13. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    12:27 PM
    1.15.x
    MariaDB 10.3.x
    php can use TCP connections, and the Redis's network protocol is basically text. But you get a bunch of performance improvements by pushing the protocol parsing into native C.

    Yes. This was actually how I did my XenForo + php7 testing.
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Thanks @Xon for the clarification :)
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice article 10 Things Not To Do In PHP 7 - Kinsta and The Getting Ready For PHP 7 Cheat Sheet - Kinsta :)

    and HHVM vs PHP 7 - The Competition Gets Closer - Kinsta

     
    Last edited: Nov 18, 2015
  16. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  17. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    test PHP 7.0.0RC7 update on my Wordpress 7 site

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu               
    --------------------------------------------------------
    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 5.2/5.5 & 10.x Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + WP Super Cache
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 5
    --------------------------------------------------------
    
    Code:
    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 - Would you like to continue? [y/n] y
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 5.4.45, 7.0.0, NGDEBUG)
    PHP 7.0.0 is experimental in alpha status and may have broken PHP extensions.
    NGDEBUG is PHP 7.0.0 minus incompatible PHP extensions
    ----------------------------------------------------------------
    Enter PHP Version number you want to upgrade/downgrade to: 7.0.0RC7
    ----------------------------------------------------------------
    Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf)
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_181115-222712
    existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_181115-222712
    ----------------------------------------------------------------
    Update & overwrite your existing php-fpm.conf [y/n]: n
    ----------------------------------------------------------------
    Downloading PHP 7.0.0RC7 from https://downloads.php.net/~ab/
    Download php-7.0.0RC7.tar.gz ...
    wget -cnv https://downloads.php.net/~ab/php-7.0.0RC7.tar.gz --tries=3
    2015-11-18 22:27:32 URL:https://downloads.php.net/~ab/php-7.0.0RC7.tar.gz [17469285/17469285] -> "php-7.0.0RC7.tar.gz" [1]
    Download done.
    php-7.0.0RC7.tar.gz valid file.
    
    Code:
    -----------------------------------------------------------------------------------------
    Detected PHP 7.0 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 you 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
    
    still redis and igbinary PHP extensions are not supported and thus unable to load errors
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/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-20151012/redis.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0
    7.0
    0
    ***************************************************
    PHP 7.0 detected.. remove unsupported PHP extensions manually
    by removing their ini files:
    ***************************************************
    
    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/mongodb.ini
    rm -rf /etc/centminmod/php.d/redis.ini
    rm -rf /etc/centminmod/php.d/suhosin.ini
    
    then restart PHP-FPM again...
    
    ***************************************************
    * PHP upgraded and auto reinstalled PHP extensions
    ***************************************************
    remove unsupported PHP extension loading and restart php-fpm
    Code:
    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/mongodb.ini
    rm -rf /etc/centminmod/php.d/redis.ini
    rm -rf /etc/centminmod/php.d/suhosin.ini
    fpmrestart
    Code:
    php -v
    PHP 7.0.0RC7 (cli) (built: Nov 18 2015 22:37:12) ( NTS )
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    As Centmin Mod PHP upgrade routine only recompiles PHP extensions it source compiled on major PHP version updates PHP 5.6 to 7.0 and not PHP minor updates 7.0.0RC6 to 7.0.0RC7, my Wordpress 7 site had previously had imagick extension removed so would not have been reinstalled on update to PHP 7.0.0RC7 so run centmin.sh menu option 15 to reinstall imagick extension to see if it detects PHP 7 and installs from imagick PHP 7 git branch

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu               
    --------------------------------------------------------
    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 5.2/5.5 & 10.x Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + WP Super Cache
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 15
    --------------------------------------------------------
    if PHP 7 is detected, imagick source code is pulled from their github php 7 branch
    Code:
    Check for php extensions
    
    *************************************************
    * Installing imagick PHP Extension
    *************************************************
    /svr-setup
    cd /svr-setup
    7.0
    0
    Cloning into 'imagick-php7'...
    remote: Counting objects: 4903, done.
    remote: Total 4903 (delta 0), reused 0 (delta 0), pack-reused 4903
    Receiving objects: 100% (4903/4903), 2.71 MiB | 1.38 MiB/s, done.
    Resolving deltas: 100% (3484/3484), done.
    
    compiling imagick PHP extension for PHP 7.x ...
    imagick PHP 7 branch extension installed it seems

    imagick.ini at /etc/centminmod/php.d/imagick.ini
    Code:
    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/memcached.ini,
    /etc/centminmod/php.d/newrelic.ini,
    /etc/centminmod/php.d/zendopcache.ini
    contents of /etc/centminmod/php.d/imagick.ini
    Code:
    extension=imagick.so
    imagick info via command line - what you see on phpinfo pages usually
    Code:
    php --ri imagick
    
    imagick
    
    imagick module => enabled
    imagick module version => @PACKAGE_VERSION@
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 6.9.1-7 Q16 x86_64 2015-07-06 http://www.imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 6.9.1-7 Q16 x86_64 2015-07-06 http://www.imagemagick.org
    ImageMagick copyright => Copyright (C) 1999-2015 ImageMagick Studio LLC
    ImageMagick release date => 2015-07-06
    ImageMagick number of supported formats:  => 220
    ImageMagick supported formats => 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FITS, FRACTAL, FTS, G3, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, 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, 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, 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
    list of loaded extension modules including imagick :D
    Code:
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    imagick
    imap
    intl
    json
    libxml
    mbstring
    mcrypt
    memcached
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
     
    Last edited: Nov 19, 2015
  18. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Updated timeline with PHP 7.0.0RC8 PHP: todo:php70 not updated yet

    php.internals: PHP 7.0.0 final RTM delay
    So Dec 3rd for PHP 7 GA, same day as Letsencrypt public beta !
     
  19. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    5:27 AM
    1.9.9
    10.1.10
    Same thing I thought when I saw this, two awesome goodies on one day :)
     
  20. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:27 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah more work for me updating Centmin Mod hehe