[SOLVED] 500 Internal Server Error after upgrading to ISPConfig 3.2

Discussion in 'Installation/Configuration' started by nijou, Nov 8, 2020.

  1. nijou

    nijou New Member

    Hello,
    OS: Debian 9.13, Apache 2
    I have just upgraded my ISPConfig with default settings, as I usually do. Unfortunately, instead of standard login page, I saw 500 Internal Server Error Apache screen. I have checked my Apache logs and they look like this (tail -f):

    [Sun Nov 08 10:21:32.534634 2020] [core:error] [pid 27127] [client 89.77.211.XXX:63899] End of script output before headers: index.php
    .php-fcgi-starter: line 6: /usr/bin/php-cgi7.0: No such file or directory
    [Sun Nov 08 10:23:28.176230 2020] [fcgid:warn] [pid 27358] (104)Connection reset by peer: [client 89.77.211.XXX:60717] mod_fcgid: error reading data from FastCGI server
    [Sun Nov 08 10:23:28.176289 2020] [core:error] [pid 27358] [client 89.77.211.XXX:60717] End of script output before headers: index.php
    .php-fcgi-starter: line 6: /usr/bin/php-cgi7.0: No such file or directory
    [Sun Nov 08 10:23:35.701094 2020] [fcgid:warn] [pid 27338] (104)Connection reset by peer: [client 89.77.211.XXX:60724] mod_fcgid: error reading data from FastCGI server
    [Sun Nov 08 10:23:35.701147 2020] [core:error] [pid 27338] [client 89.77.211.XXX:60724] End of script output before headers: index.php
    .php-fcgi-starter: line 6: /usr/bin/php-cgi7.0: No such file or directory
    [Sun Nov 08 10:23:37.882016 2020] [fcgid:warn] [pid 27132] (104)Connection reset by peer: [client 89.77.211.XXX:60723] mod_fcgid: error reading data from FastCGI server
    [Sun Nov 08 10:23:37.882068 2020] [core:error] [pid 27132] [client 89.77.211.XXX:60723] End of script output before headers: index.php

    What has happened and how can I fix this? All webistes and PHPmyadmin work well, I just cannot login into ISPConfig.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP 7 CGI package is missing. run:

    apt-get install php7.0-cgi

    to install it.
     
  3. nijou

    nijou New Member

    Hello. Just installed PHP 7 CGI package. Got more errors with tail -f:

    [Sun Nov 08 10:53:17.676513 2020] [fcgid:warn] [pid 4642] [client 89.77.211.XXX:62260] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/index.php(32): require_once('/usr/local/ispc...')
    [Sun Nov 08 10:53:17.676515 2020] [fcgid:warn] [pid 4642] [client 89.77.211.XXX:62260] mod_fcgid: stderr: #3 {main}
    [Sun Nov 08 10:53:17.676518 2020] [fcgid:warn] [pid 4642] [client 89.77.211.XXX:62260] mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 83
    [Sun Nov 08 10:53:22.606906 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:83
    [Sun Nov 08 10:53:22.606945 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: Stack trace:
    [Sun Nov 08 10:53:22.606954 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(66): db->__construct()
    [Sun Nov 08 10:53:22.606962 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/lib/app.inc.php(392): app->__construct()
    [Sun Nov 08 10:53:22.606970 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/index.php(32): require_once('/usr/local/ispc...')
    [Sun Nov 08 10:53:22.606977 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: #3 {main}
    [Sun Nov 08 10:53:22.606984 2020] [fcgid:warn] [pid 4647] [client 89.77.211.XXX:62268] mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 83

    Something is definitely wrong...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, many PHP packages are missing. I wonder how your system worked before as any older ISPConfig version required the same packages. Install the missing packages with this command:

    apt-get -y install php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-zip php7.0-mbstring php7.0-soap
     
    Th0m likes this.
  5. nijou

    nijou New Member

    Awesome, thanks! My ISPConfig works again.
    Yes, I also wonder what happened and how it worked before. Could be that PHP 7.0 got accidentally removed during the last system upgrade. Anyway - now I know what was the reason for the 500 error.
    BTW: What is the best PHP version for ISPConfig 3.2 and which configuration file defines it?
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Keep the system php version the same as what ships with your OS version; the settings for that are under server config. Then you add additional php versions for any other versions which you want to use for your websites.
     
    Th0m likes this.
  7. c3n

    c3n Member

    I am fucked... :) Same issue, same debian... After upgrading ISPCONFIG Multi (main) from ISPCONFIG 3.1.latest to 3.2
    first server fatal error.
    Than I installed all missing PHP for 7.0/7.1/7.2/7.3 none of this is working.
    Now /usr/bin/php --version

    PHP 7.2.34-8+0~20201103.52+debian9~1.gbpafa084 (cli) (built: Nov 3 2020 14:33:21) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34-8+0~20201103.52+debian9~1.gbpafa084, Copyright (c) 1999-2018, by Zend Technologies

    I am trying to access :8080 panel from different domains with different PHP... without success... Here are my logs

    [Mon Nov 16 21:12:09.510850 2020] [ssl:error] [pid 6914:tid 140307211462400] AH01941: stapling_renew_response: responder error
    [Mon Nov 16 21:12:09.555847 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:83
    [Mon Nov 16 21:12:09.555889 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: Stack trace:
    [Mon Nov 16 21:12:09.555892 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(66): db->__construct()
    [Mon Nov 16 21:12:09.555895 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/lib/app.inc.php(392): app->__construct()
    [Mon Nov 16 21:12:09.555897 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/index.php(32): require_once('/usr/local/ispc...')
    [Mon Nov 16 21:12:09.555913 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: #3 {main}
    [Mon Nov 16 21:12:09.555915 2020] [fcgid:warn] [pid 6914:tid 140307211462400] [client XX.XX.XX.XX:59629] mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 83

    This is main interface to run all settings for multiserver. So now It is not accessible. I need to fix it fast.

    I dont want to rollback to backups because I got one node with ISP 3.2 installed and I cannot setup PHP_FPM from old panel... so i tried to upgrade main... :(

    Waiting for Your kindly reply, Maciej
     
  8. c3n

    c3n Member

    I changed version for system PHP i rebooted server and after few minutes got panel working.... OMG. Heart attack...

    double check:
    update-alternatives --config php
    update-alternatives --config php-cgi
    and reboot server.
     
    Th0m likes this.

Share This Page