Get the most out of your Centmin Mod LEMP stack
Become a Member

PHP-FPM Upgraded to PHP 7 - broken - downgraded - still broken

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Robust, Dec 4, 2015.

  1. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    All seems to be broken.

    Pages return errors with 500 response code. Often to say that they cannot read the files they need to read. Files are chown'd and chmodded correctly, to the nginx user which is defined in nginx and should be defined in php.

    I seem to be missing my pool config and so on... It was here before, now it isn't. Centminmod really needs to keep configs in one place, atm they're all over the place...

    Anyway, so I have errors like the file is not in open_basedir, however in php -i and php.ini it is not defined (open_basedir). I have so many errors but none are in the error logs... I found the open_basedir one and 2 more finally after looking around. No errors are being logged, not even with error reporting on. The page says it was a 500 error in the JS/Event Console.

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod version used ? and last time you updated the code ?

    What web php apps you using ? do they have full PHP 7 support ? do their plugins or extensions also have full PHP 7 support ?

    I only recently updated both Centmin Mod 123.08stable and 123.09beta01 builds to properly support downloading PHP 7.0.0 GA series source tarball files. Prior, when you entered PHP version 7.0.0 on centmin.sh menu option 5 for PHP upgrades, it would download from PHP 7 github based master dev branch. The update now changes that to download the official php.net hosted source tarball files. Example of centmin.sh menu option 5 upgrade to PHP 7.0.0 here.

    To update your Centmin Mod builds follow instructions at centminmod.com/upgrade.html and respective version threads below:
    For open_basedir messages read FAQ item 26 and if using Xenforo open_basedir section outlined at centminmod.com/nginx_configure_xenforo_seo_friendly_urls.html

    To troubleshoot, you need to check the the php upgrade log 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 initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    where were you looking for pool config ?

    also post your nginx vhost domain.com.conf files too if you have custom web apps as some folks have mis configured their vhosts i.e. Upgrade - No Input File Specified - Logs? | Centmin Mod Community
     
  4. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    Latest, using git version and updated from git before the upgrade.

    IonCube, Memcached, which don't. So I downgraded back to PHP 5.6 and it's still broken.

    I entered: 7.0.0R8 btw

    Ah... centminlogs... useful.
     
  5. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    /usr/local/php, /usr/local/lib/php/, /usr/local/include/php, /usr/local/etc/php-fpm.d (found default pool config)
     
  6. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    Reinstalling memcached as I saw a lot of memcache errors.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    For config files see Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    memcache PHP extension isn't supported by PHP 7 only memcached PHP extension see example i posted at PHP - Php 7.0 Final | Centmin Mod Community which includes how to remove unsupported php extension's *.ini files.

    at end of PHP 7.0.0 upgrade you get the following notes
    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/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/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-20151012/mongo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/mongo.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...
     
  9. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
  10. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    A memcached upgrade fixed it, though I built it from source myself. Will use the built in centminmod loader and see if it makes a difference.

    Cheers!
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    PHP 7.0.0 update doesn't support memcache php extension among others. If followed instructions to remove
    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
    then when you downgrade to PHP 5.6, these PHP extensions will not have been loaded so need to follow same instructions as php upgrades for major PHP versions outlined at PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS and recompile them, i.e. centmin.sh menu option 10 (memcache) and option 15 (imagick) reinstall. If your web apps relied on memcache and/or imagick PHP extensions that would be one reason why they are broken even for downgrades. Then when you recompile php via centmin.sh menu option 5 for PHP 5.6.16 it should auto compile igbinary, redis PHP extensions too.

    yes you'd break memcached server support if you source compile yourself, Centmin Mod has special compilation for other supported options within the source compile.
     
  12. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    I didn't remove the extensions. I didn't even try PHP 7, I just went straight back to 5.6 realising this VPS also has a WHMCS installation.

    Speaking of WHMCS, my Memcached fix was partial. Still having problems with user permissions:
    Permissions Error
    The templates compiling directory '/home/nginx/domains/domain/private/templates_c' must be writeable (CHMOD 777) before you can continue.
    If the path shown is incorrect, you can update it in the configuration.php file.

    Error in WHMCS. templates_c is chown'd by nginx:nginx and chmod to 777 (as per WHMCS instructions)
     
  13. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    On that note, where is the PHP error log file in centmin installations? Not recorded in /home/nginx/.../log/error.log or /var/log/php-fpm/*
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh never used WHMCS myself but pretty sure they don't support PHP 7 yet

    See at How to troubleshoot Centmin Mod initial install issues
     
  15. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    hm... one of my sites admin.php is working, the other isn't. the not working one says: no input file specified
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  17. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    Never mind about it being fixed... the fix was short lived. Didn't edit anything and it's back to 500 errors.
     
  18. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    So I did one more PHP/nginx reboot and everything is fixed now... again...

    I'm going to see how it plays out and then get back to you.
     
  19. eva2000

    eva2000 Administrator Staff Member

    54,868
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    10:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you recompile ioncube PHP extension ? I believe WHMCS requires it and jump from PHP 5.6 to PHP 7.0.0 and back may require recompile of PHP after you have all PHP extensions manual recompiled i.e. memcache and imagick.

    and with open_basedir it's a nginx setting implementation so when you restart you need to restart nginx and php-fpm not just php-fpm

    easier via centmin mod command shortcuts at FAQ item 16
    Code:
    nprestart
     
  20. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    10:19 PM
    1.9.7
    10.1
    oh yeah, I had that disabled already

    I had it saved already, wasn't removed initially so I just left it as-is. only memcache needed a recompile, for some reason. ioncube is working perfectly.

    nifty, thanks :)