Welcome to Centmin Mod Community
Register Now

Upgrade PHP 7.1.0

Discussion in 'Install & Upgrades or Pre-Install Questions' started by CarpCharacin, Dec 2, 2016.

  1. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    Does it support PHP 7.1.0? I just want to check before upgrading.

    EDIT: It looks like it does. I am going to go ahead and upgrade.
     
    Last edited: Dec 2, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    wow you beat us all to the punch PHP 7.1.0 released PHP: News Archive - 2016

    Should work, try and see :)
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    edit.. nope 123.09beta01 needs updating as 7.1.0 specified installs git master dev repo not official 7.1.0 right now
    Code (Text):
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 5.6.28, 7.0.10, NGDEBUG)
    PHP 7.0.10 is GA Stable but still may have broken PHP extensions.
    NGDEBUG is PHP 7.1.0 minus incompatible PHP extensions
    ----------------------------------------------------------------
    Enter PHP Version number you want to upgrade/downgrade to: 7.1.0
    ----------------------------------------------------------------
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_021216-081201
    Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf)
    existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_021216-081201
    ----------------------------------------------------------------
    Update & overwrite your existing php-fpm.conf [y/n]: n
    ----------------------------------------------------------------
    Downloading PHP 7.1 from https://git.php.net/repository/php-src.git
    Cloning into 'php-7.1.0'...
     
  4. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    I did the upgrade and it now says I am on 7.2.0-dev. So what should I do? I entered 7.1.0, not 7.2.0.
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah as you ran 7.1.0 update before i updated centmin mod code to switch 7.1.0 from github dev branch which is 7.2.0 now to 7.1.0 GA release. See next post to update 123.09beta01 and re-run centmin.sh menu option 5

    fyi, if you specify php version = 7.2.0 now, you get the github dev php 7.2.0-dev branch if you want to live on bleeding edge :)
     
    Last edited: Dec 2, 2016
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5

    PHP 7.1.0 GA Support Update



    Updated both Centmin Mod 123.08stable and 123.09beta01 builds for PHP 7.1.0 General Release support. You'll need to update Centmin Mod via centmin.sh menu option 23 submenu option 2 outlined below and exit centmin.sh and re-run centmin.sh menu option 5 to update to PHP 7.1.0.

    To update your Centmin Mod builds follow instructions at centminmod.com/upgrade.html and respective version threads below:
    example centmin.sh menu option 5 PHP 7.1.0 update

    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 5.2/5.5 & 10.x Upgrade Sub-Menu
    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: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    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 - Would you like to continue? [y/n] y
    
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 5.6.28, 7.0.10, NGDEBUG)
    PHP 7.0.10 is GA Stable but still may have broken PHP extensions.
    NGDEBUG is PHP 7.1.0 minus incompatible PHP extensions
    ----------------------------------------------------------------
    Enter PHP Version number you want to upgrade/downgrade to: 7.1.0
    ----------------------------------------------------------------
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_021216-081759
    Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf)
    existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_021216-081759
    ----------------------------------------------------------------
    Update & overwrite your existing php-fpm.conf [y/n]: n
    ----------------------------------------------------------------
    

    Code (Text):
    -----------------------------------------------------------------------------------------
    Detected PHP 7.1 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

    end result
    Code (Text):
    php -v     
    PHP 7.1.0 (cli) (built: Dec  2 2016 08:21:30) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.1.0, Copyright (c) 1999-2016, by Zend Technologies

    php extensions
    Code (Text):
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    ldap
    libxml
    mailparse
    mbstring
    mcrypt
    memcache
    memcached
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
     
    • Like Like x 1
  7. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    I actually just started downgrading to php 7.0.13, so when that is done I will do the centmin mod update and then re upgrade to 7.1.0.
     
    • Like Like x 1
  8. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    I tried to update it, but it just said
    Code:
    Updating Current Centmin Mod code branch via git
    
     Centmin Mod local code up to date at /usr/local/src/centminmod
     no available updates at this time...
    
    I think I might have updated after I did the first php 7.1.0 upgrade. Is it safe to try again to upgrade to 7.1.0?
     
  9. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    check the last update commit via git log command in /usr/local/src/centminmod
    Code (Text):
    cd /usr/local/src/centminmod
    git log -1

    example output with masked email address to prevent spam bots from scrapping email
    Code (Text):
    git log -1
    commit edd0271cef92831411b1dbd1edc0333d61309163
    Author: George Liu <myemail>
    Date:   Fri Dec 2 18:17:01 2016 +1000
    
        update inc/phpng_download.inc for PHP 7.1.0 / 7.2.0
    

    that's the commit last made as per listing at Commits · centminmod/centminmod · GitHub
     
    • Like Like x 1
  10. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    I started the upgrade before I checked :facepalm:. Now I am back on 7.2.0-dev. How do I update the centmin mod code? It says it is up to date when I try but it isn't.
     
  11. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    so git log -1 command doesn't report that commit ? try manual method
    Code (Text):
    cd /usr/local/src/centminmod
    git stash
    git pull
    ./centmin.sh
    


    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
     
  12. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    It reports the commit, but it put me on php 7.2.0-dev.
     
  13. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    for PHP version did you type 7.1.0 ?

    To troubleshoot, you need to check the php upgrade logs at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the php_upgrade logs. You can see full details at How to troubleshoot Centmin Mod initial install issues

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade or php in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    

    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    -rw-r--r--  1 root root  2.6M Oct  3 03:48 centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    -rw-r--r--  1 root root  664K Oct 12 09:24 centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    

    So the last nginx upgrade log was named centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log and located at /root/centminlogs/ccentminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    then use cat command to output the contents of that log. Do the same for php_upgrade.log log.

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share

    so only need content of a specific log, in this case most recent php_upgrade.log logs
     
  14. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
  15. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    didn't get the full php_upgrade log output so might need to download the log file and copy and paste to pastebin. From what i can see from partial log some source tarballs might be missing or has php extension compile errors which means failed php upgrade, which means you revert or stay on previous working php version which is 7.2.0-dev
     
  16. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    I was on 7.2.0-dev and then I downgraded to 7.0.13 and then tried to upgrade again and ended up back on 7.2.0-dev.
     
  17. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    did PHP 7.0.13 downgrade work ? try downgrade to PHP 7.0.13 and then exit centmin.sh menu

    then re-run centmin.sh menu option 5 for PHP 7.1.0 update
     
  18. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    The downgrade did work. I already did that, but I will try it again.
     
  19. CarpCharacin

    CarpCharacin Member

    203
    14
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +18
    Local Time:
    1:12 PM
    1.13.0
    MariaDB 10
    Just downgraded. It did work. I think the problem might be that it is using the version I downloaded in the first attempt I made at upgrading to 7.1.0. Is there any way to re download it?
     
  20. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,750
    Local Time:
    5:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    ah yes that could be it, just remove it from /svr-setup
    Code (Text):
    cd /svr-setup
    rm -rf /svr-setup/php-7.1.0*
    

    then re-run centmin.sh menu option 5 :)
     
    • Like Like x 1