Welcome to Centmin Mod Community
Become a Member

Anyone else having problems upgrading PHP?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jon Snow, Apr 27, 2018.

  1. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Fresh Centmin install this week.

    PHP Security & Bug Fix Updates For PHP 5.6.36, 7.0.30, 7.1.17 and 7.2.5

    Just saw this so I decided to upgrade from PHP 7.1.16 to 7.1.17. I had upgrade from PHP 5 to PHP 7 before, but now when I try to upgrade to the latest security patch, it runs fine for 1-5 minutes and then it ends with the centminmod menu.

    Code (Text):
    clang: error: unknown argument: '-fstack-protector-strong'
    make[1]: *** [ext/intl/intl_convertcpp.lo] Error 1
    make[1]: Leaving directory `/svr-setup/php-7.1.17/fpm-build'
    make: *** [prof-use] Error 2
    
    real    2m9.907s
    user    1m59.555s
    sys     0m8.936s
    
    Thu Apr 26 21:30:37 UTC 2018
    Error: 2, PHP make failed (123.09beta01.b019)

    Below that it lists the sever specs and the regular stats that shows when logging in via SSH.
     
  2. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    If it helps, I did the PHP upgrade on two servers but same result.
     
  3. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    and what was server spec details reported.. that will help too
     
  4. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    I already closed the window but they were $5/month Linode plans.
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    • What version of PHP used ? Did you upgrade or downgrade PHP recently ? Which version did you upgrade from ?
    Every centmin.sh menu option has a full server log created with time stamped file name at /root/centminlogs. You can check that specific error log for clues or copy and paste log contents and post to pastebin.com or gist.github.com for sharing.

    To troubleshoot, you need to check the 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 nginx_upgrade and 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 php_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 php upgrade log was named centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log and located at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    then use cat command to output the contents of that 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. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of a specific log, in this case most recent php_upgrade.log logs
     
  6. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    ^ First answer ;)

    File was too large for Pastebin so I'll attach it to a private google drive and send you it.
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Made a bug fix update in 123.09beta01 Beta Branch - update php routine ensure PHP_PGO disabled if less than 2 cpu cores

    So update your local Centmin Mod code and re-try centmin.sh menu option 5

    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 or you can run cmupdate command that was recently added.

    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 switching via Git backed environment you can setup.

    For 123.08stable that means centmin.sh menu option 23 submenu option 2 (if you previously ran submenu option 1) first, then exit centmin.sh, re-enter /usr/local/src/centminmod and re-run centmin.sh menu.

    For 123.09beta01 and higher that means running SSH command = cmupdate and then re-enter /usr/local/src/centminmod and re-run centmin.sh menu.

    For full details read the following links:
     
  8. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000 Unfortunately, it didn't work :( Same error.
     
  9. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Should I remove PHP_PGO from my custom config?
     
  10. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    contents of /etc/centminmod/custom_config.inc ?
    Code (Text):
    cat /etc/centminmod/custom_config.inc
    

    how did you update 123.09beta01 code ? via cmupdate command ?
     
  11. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Code (Text):
    NGINX_PAGESPEED='y'
    NGXDYNAMIC_NGXPAGESPEED='y'
    LETSENCRYPT_DETECT='y'
    MARCH_TARGETNATIVE='n'
    PHP_PGO='y'

    I updated from the centminmod menu, exited the SSH window then re-connected.
     
  12. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    try doing it via cmupdate command to verify as the latest update i made will auto disable PHP_PGO='y' if you only have 1 cpu core detected so shouldn't run into that issue
    Code (Text):
    cmupdate
    cmdir
    ./centmin.sh
    
     
  13. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    cmupdate said it was already updated but I went through with the PHP upgrade and same error :(
     
  14. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    strange, not able to reproduce error even with PHP_PGO='y' set. What if you remove PHP_PGO='y' ?
     
  15. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI from first post error, -fstack-protector-strong is never ever referenced in any php routines so no idea why it showed up as only place it's referenced in is for nginx compile routines
    Code (Text):
    clang: error: unknown argument: '-fstack-protector-strong'
    
     
  16. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Same error :/
     
  17. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    if you compile PHP 7.1.16 does it work ? maybe something new in 7.1.17
     
  18. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI, made another update to 123.09beta01 so switch fallback back from Clang to GCC compiler when cpu cores less than 2 detected. See if that helps.
     
  19. Jon Snow

    Jon Snow Active Member

    433
    65
    28
    Jun 30, 2017
    Ratings:
    +103
    Local Time:
    1:48 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000 It worked.

    Total PHP Upgrade Time: 813.248561356 seconds

    Code (Text):
    php -v
    PHP 7.1.17 (cli) (built: Apr 27 2018 02:21:13) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.1.17, Copyright (c) 1999-2018, by Zend Technologies
     
  20. eva2000

    eva2000 Administrator Staff Member

    41,292
    9,266
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,217
    Local Time:
    2:48 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    excellent :)