Join the community today
Register Now

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:
    3:58 AM
    1.9.7
    10.1
    btw, my admin.php block

    Code:
            location = /admin.php {
                    include /usr/local/nginx/conf/site/adminip;
                    auth_basic "Administrator Login";
                    auth_basic_user_file /usr/local/nginx/conf/site/passwords;
                    include /usr/local/nginx/conf/phpgeneric.conf;
            }
    phpgeneric.conf is php.conf with the location php brackets removed

    is it really necessary to include php again? if I don't it just downloads the file for some reason, it isn't interpreted.
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  3. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    3:58 AM
    1.9.7
    10.1
    thanks.

    btw, you can shorten:
    Code:
    location /internal_data/ {
         internal;
         allow 127.0.0.1;
         allow YOURIPADDRESS;
         deny all;
    }
    
    location /library/ {
         internal;
         allow 127.0.0.1;
         allow YOURIPADDRESS;
         deny all;
    }  
    to just:
    Code:
    location /(internal_data|library) {
         internal;
    }  
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    you can but i just do them separate - easier to visualise initially
     
  5. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    3:58 AM
    1.9.7
    10.1
    and explicitly allowing 127.0.0.1 isn't rly needed as it's not a client access, and in this context specifically you don't really need to allow any ips
     
  6. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    3:58 AM
    1.9.7
    10.1
    btw thanks for the support :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    you're welcome
    indeed
     
  8. Eduardo

    Eduardo Member

    38
    3
    8
    Feb 7, 2015
    Ratings:
    +5
    Local Time:
    2:58 PM
    1.7.9
    its safe to upgrade now?
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    totally web app dependent, you need to be sure all your php using apps, plugins, extensions for your web scripts i.e. forum, wordpress etc support PHP 7
     
  10. Eduardo

    Eduardo Member

    38
    3
    8
    Feb 7, 2015
    Ratings:
    +5
    Local Time:
    2:58 PM
    1.7.9
    I dont have problem with my sites, centmin should work compile without problems? just go option 5 and have fun? :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  12. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    1:58 AM
    Mainline
    10.2
    I just upgraded my Live WP sites with PHP 7.0.0 without any issues but SPEED :D.
     
  13. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    congrats :)
     
  14. Robust

    Robust Member

    49
    3
    8
    Jun 14, 2015
    Ratings:
    +5
    Local Time:
    3:58 AM
    1.9.7
    10.1
    I'm getting 500 errors with nginx->php and the PHP error logs don't record a thing. nginx error logs just show a 500 error happened, tried to serve 500.html which didn't exist so it used 404.html (404, 500.html not found)

    Weirdest thing about centmin is the PHP logs are literally useless in my experience. Why?
     
  15. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    well 500 errors are with nginx not php so probably why

    but what url and thus web app do nginx logs report as having 500 errors ?

    if you have alot of disk space and can enable debug nginx, you can enable and compile a nginx debug build of nginx via centmin.sh option NGINX_DEBUG=y centminmod/centmin.sh at 123.08stable · centminmod/centminmod · GitHub You can place the option in persistent config /etc/centminmod/custom_config.inc outlined at centminmod.com/upgrade.html#persistent so place in file /etc/centminmod/custom_config.inc
    Code:
    NGINX_DEBUG=y
    then recompile nginx via centmin.sh menu option 4 and then in your nginx error_log directive add debug option A debugging log and restart nginx and check logs

    They will be very very very verbose and lot alot to disk so ensure you have alot of disk free space.

    You can minimise this by limiting it to specific ip based client connections too
    After debugging is done, reverse the debug now by setting NGINX_DEBUG=n and recompile Nginx again
     
    Last edited: Dec 6, 2015
  16. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    1:58 AM
    Mainline
    10.2
    Remove open_base dir on php.conf then run nprestart.
     
  17. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:58 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    You also have ssl misconfiguration too Apantic Downtime Alert | XenForo Community

    you can use nginx vhost generator at Generate Centmin Mod Nginx Vhost - CentminMod.com LEMP Nginx web stack for CentOS and select self signed ssl check box and drop down menu for xenforo config and generator a template of latest ssl configured vhost for HTTP/2 and use those settings transplanted to your vhost (oh do not transplant commented out ocsp stapling settings as that only applies to self-signed ssl not to paid)
     
    Last edited: Dec 6, 2015