ISPConfig Login Page 500 Error

Discussion in 'General' started by rwheindl, Jun 13, 2021.

  1. rwheindl

    rwheindl Member

    I'm getting a 500 error on the ISPConfig login page and the following in the httpd error_log. This is a Centos 7.9 server with PHP 7.4. Could someone help me understand what these errors mean, taken from /var/log/httpd/error_log?
    Code:
    [Sat Jun 12 21:26:02.597558 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined method app::load() in /usr/local/ispconfig/interface/lib/app.inc.php:64
    [Sat Jun 12 21:26:02.597659 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr: Stack trace:
    [Sat Jun 12 21:26:02.597668 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(395): app->__construct()
    [Sat Jun 12 21:26:02.597675 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/web/login/index.php(32): require_once('/usr/local/ispc...')
    [Sat Jun 12 21:26:02.597682 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr: #2 {main}
    [Sat Jun 12 21:26:02.597688 2021] [fcgid:warn] [pid 29575] [client xx.xx.xx.xx:49685] mod_fcgid: stderr:   thrown in /usr/local/ispconfig/interface/lib/app.inc.php on line 64
     
    Last edited: Jun 13, 2021
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do an ISPConfig update with:

    ispconfig_update.sh

    to see if the error persists. If it persists, then check if you really use PHP 7.4 and not PHP 8.
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  4. rwheindl

    rwheindl Member

    php -v
    Code:
    PHP 7.4.20 (cli) (built: Jun  1 2021 15:41:56) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
        with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies
        with scoutapm v1.2.2, Copyright 2019, by Scout APM
        with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans
        with ddtrace v0.60.0, Copyright Datadog, by Datadog
     
  5. rwheindl

    rwheindl Member

    ispconfig_update.sh
    Code:
    
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _
    |_   _/  ___| ___ \ /  __ \            / _(_)
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| |
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, |
                                                  __/ |
                                                 |___/
    --------------------------------------------------------------------------------
    
    
    >> Update
    
    Please choose the update method. For production systems select 'stable'.
    WARNING: The update from GIT is only for development systems and may break your current setup. Do not use the GIT version on servers that host any live websites!
    Note: On Multiserver systems, enable maintenance mode and update your master server first. Then update all slave servers, and disable maintenance mode when all servers are updated.
    
    Select update method (stable,nightly,git-develop) [stable]:
    
    There are no updates available for ISPConfig 3.2.5
    If you are sure you want to update to stable anyway, please use --force parameter
    DOWNGRADING MAY CAUSE ISSUES!
    Should I use --force? Now I'm wondering if something got corrupt.
     
    Last edited: Jun 13, 2021
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Like the message tells you: If you are sure you want to update to stable anyway, please use --force parameter
    so:
    Code:
    ispconfig_update.sh --force
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, please use --force. Missed to add that to the command.
     
  8. rwheindl

    rwheindl Member

    I reinstalled with --force and I'm still getting the same result. What else could I check? And thank you both for the assistance so far.
    I took a look at the code in the file and I don't understand why PHP is throwing these errors. Unless there's an order of operations issue. But app::load() looks defined to me!?!? Looks like line 64 is loading database files with $this->load(). Why does PHP think it's not defined? Hmmm...?
     
    Last edited: Jun 13, 2021
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the output of
    Code:
    ls -la /etc/alternatives/ph*
     
  10. rwheindl

    rwheindl Member

    No such file or directory.
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Maybe it's
    Code:
    ls -la /var/lib/alternatives/ph*
    on CentOS?
     
  12. rwheindl

    rwheindl Member

    /var/lib/alternatives does exist, so does /etc/alternatives, but also: No such file or directory.
     
    Last edited: Jun 14, 2021
  13. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    What is your php-cgi --version output?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    That's ok for a CentOS system, this is a mechanism that exists on Debian and Ubuntu only.

    That's strange indeed and I have not seen that on another system yet.
     
  15. rwheindl

    rwheindl Member

    Code:
    PHP 7.4.20 (cgi-fcgi) (built: Jun  1 2021 15:41:56)
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
        with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies
        with scoutapm v1.2.2, Copyright 2019, by Scout APM
        with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans
        with ddtrace v0.60.0, Copyright Datadog, by Datadog
    Looks the same as php -v
     
  16. rwheindl

    rwheindl Member

    I'll look through other logs to see if I can find anything useful that might be related.
     
  17. rwheindl

    rwheindl Member

    I found this error in /var/log/httpd/ssl_error_log
    Code:
    [Thu Jun 17 12:03:37.112552 2021] [php7:notice] [pid 17965] [client xx.xx.xx.xx:39378] PHP Stack trace:
    [Thu Jun 17 12:03:37.112594 2021] [php7:notice] [pid 17965] [client xx.xx.xx.xx:39378] PHP   1. {main}() /usr/local/ispconfig/interface/web/index.php:0
    [Thu Jun 17 12:03:46.217415 2021] [php7:notice] [pid 17966] [client xx.xx.xx.xx:57826] PHP Warning:  require_once(/usr/local/ispconfig/interface/lib/config.inc.php): failed to open stream: Permission denied in /usr/local/ispconfig/interface/web/index.php on line 31
    After fixing the permissions on config.inc.php (changed from 600 to 750). I'm working through this new permission error that showed up.
    Code:
    [Thu Jun 17 13:30:27.987539 2021] [php7:notice] [pid 40442] [client xx.xx.xx.xx:55233] PHP Fatal error:  Uncaught InvalidArgumentException: Please make sure the folder '/usr/local/ispconfig/interface/lib/classes/IDS/../../../temp' is writable in /usr/local/ispconfig/interface/lib/classes/IDS/Monitor.php:159\nStack trace:\n#0 /usr/local/ispconfig/interface/lib/classes/ids.inc.php(114): IDS\\Monitor->__construct()\n#1 /usr/local/ispconfig/interface/lib/app.inc.php(408): ids->start()\n#2 /usr/local/ispconfig/interface/web/index.php(32): require_once('/usr/local/ispc...')\n#3 {main}\n  thrown in /usr/local/ispconfig/interface/lib/classes/IDS/Monitor.php on line 159
    [Thu Jun 17 13:30:28.000636 2021] [php7:notice] [pid 40442] [client xx.xx.xx.xx:55233] PHP Warning:  Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/opt/remi/php74/lib/php/session) in Unknown on line 0
    I'm going to compare file and directory permissions with another working ISPConfig server.
     
    Last edited: Jun 17, 2021
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Before altering permissions of files, I would first verify the script is running as the correct user.
     
  19. rwheindl

    rwheindl Member

    What's the best way to check that? I don't know how to find that out.
    I changed the file back to 600 perms. It was 600 on my other working server. This is the directory output where the index page sits. Based on this I'm guessing it's supposed to run as the "ispconfig" user? Or should it be running as apache?
    Code:
    [root@*** web]# ls -lha
    total 96K
    drwxr-x---. 19 ispconfig ispconfig 4.0K May 10 08:50 .
    drwxr-x---.  9 ispconfig ispconfig  106 Dec 21  2016 ..
    drwxr-x---.  6 ispconfig ispconfig 4.0K Dec 21  2016 admin
    -rwxr-x---.  1 ispconfig ispconfig 3.2K Jun 13 15:23 capp.php
    drwxr-x---.  6 ispconfig ispconfig 4.0K Dec 21  2016 client
    -rwxr-x---.  1 ispconfig ispconfig 3.0K Jun 13 15:23 content.php
    drwxr-x---.  7 ispconfig ispconfig  120 Dec 21  2016 dashboard
    -rwxr-x---.  1 ispconfig ispconfig 1.9K Jun 13 15:23 datalogstatus.php
    drwxr-x---.  6 ispconfig ispconfig 4.0K Mar 24 17:45 dns
    -rwxr-x---.  1 ispconfig ispconfig    0 Jun 13 15:23 dummy_login.html
    -rwxr-x---.  1 ispconfig ispconfig  19K Feb 11  2019 favicon.ico
    drwxr-x---.  6 ispconfig ispconfig 4.0K Dec 21  2016 help
    -rwxr-x---.  1 ispconfig ispconfig 4.5K Jun 13 15:23 index.php
    drwxr-x---.  6 ispconfig ispconfig  249 Feb 11  2019 js
    -rwxr-x---.  1 ispconfig ispconfig 1.7K Jun 13 15:23 keepalive.php
    drwxr-x---.  4 ispconfig ispconfig  115 Dec 21  2016 login
    drwxr-x---.  6 ispconfig ispconfig 4.0K Feb 11  2019 mail
    drwxr-x---.  6 ispconfig ispconfig 4.0K Dec 21  2016 mailuser
    drwxr-x---.  6 ispconfig ispconfig 4.0K Mar 24 17:45 monitor
    -rwxr-x---.  1 ispconfig ispconfig 5.1K Jun 13 15:23 nav.php
    drwxr-x---.  2 ispconfig ispconfig   74 Feb 11  2019 remote
    -rwxr-x---.  1 ispconfig ispconfig   26 Jun 13 15:23 robots.txt
    drwxr-x---.  7 ispconfig ispconfig 4.0K Dec 21  2016 sites
    drwxr-x---.  3 ispconfig ispconfig   17 Dec 21  2016 strengthmeter
    drwxrwx---.  2 ispconfig ispconfig   23 Dec 21  2016 temp
    drwxr-x---.  3 ispconfig ispconfig   21 Dec 21  2016 themes
    drwxr-x---.  6 ispconfig ispconfig  253 Dec 21  2016 tools
    drwxr-x---.  6 ispconfig ispconfig 4.0K Dec 21  2016 vm
    [root@*** web]# pwd
    /usr/local/ispconfig/interface/web
    [root@*** web]#
    Code:
    [root@*** web]# id ispconfig
    uid=5003(ispconfig) gid=5004(ispconfig) groups=5004(ispconfig)
    [root@*** web]#
     
    Last edited: Jun 17, 2021
  20. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I supposed the easiest way is to update ISPConfig as root as I think that will overwrite all ISPConfig files and folders to default users and permissions?
     

Share This Page