Control panel not working

Discussion in 'Installation/Configuration' started by Steffan, Feb 25, 2023.

  1. Steffan

    Steffan Member

    hello,

    i did a restore of a VPS and now the controlpanel is not working anymore.
    it is not related to the controlpanel but to fcgi
    Everything else is working.
    I cant find where the problem is.
    Every rights i can think of seems to be oke
    Are there any pointers what i can change in the vhost section to switch to php-fpm
    Ore someone know how te debug this?

    All vsites are php-fpm en running fine
    The whole server is running fine but not the control panel

    the message im getting
    mod_fcgid: error reading data from FastCGI server
    End of script output before headers
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Try doing a forced ISPConfig update:

    ispconfig_update.sh --force
     
  3. Steffan

    Steffan Member

    I treid that yesterday with no luck. In the ispconfig dashboard web directory i put a simple test.php file with just phpinfo(); in it.
    It gives me the same error. A html page just works.

    I have compaired a lot of files and directories with a working server but cant find anything different. I dont know fcgi that mutch and mis info to debug that.
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Can you check all your php installs?
     
  5. Steffan

    Steffan Member

    Like i said
    All php-fpm sites works.
    Only fcgi seems not
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    What is your OS and its version as well as default php version?
     
  7. Steffan

    Steffan Member

    the controlpanel is using php7.4
    it is centos 8 stream.

    But like i said it is a backup of another server it worked fine before the backup.
    So im still looking how to debug fcgi
    or remove fcgi from the settings so the controlpanel uses php-fpm.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try running the FastCGI php binary (which is the same as the CGI binary) on the shell e.g. with --version cmd option to see if it spits out an error?
     
  9. Steffan

    Steffan Member

    Can you help me with a example how to do that?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the commands:

    ls -la /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter
    cat /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter

    and post the output.
     
  11. Steffan

    Steffan Member

    Code:
    -r-xr-x--- 1 ispconfig ispconfig 289 Feb 25 04:27 /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter
    
    Code:
    #!/bin/sh
    PHPRC=/etc/
    export PHPRC
    export PHP_FCGI_MAX_REQUESTS=5000
    export PHP_FCGI_CHILDREN=1
    exec  /usr/bin/php-cgi \
        -d disable_classes= \
        -d disable_functions= \
        -d magic_quotes_gpc=off \
        -d open_basedir= \
        -d session.save_path=/usr/local/ispconfig/interface/temp
    
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, please run:

    /usr/bin/php-cgi --version

    now
     
  13. Steffan

    Steffan Member

    Code:
    /usr/bin/php-cgi --version
    PHP 7.4.33 (cgi-fcgi) (built: Oct 31 2022 10:36:05)
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v12.0.3, Copyright (c) 2002-2022, by ionCube Ltd.
        with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
    
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so that's working. Another possibility is that one of the folder permissions is wrong. One of these folders:

    /var
    /var/www
    /var/www/php-fcgi-scripts
    /var/www/php-fcgi-scripts/ispconfig

    Do you have another working system to compare them to?
     
  15. Steffan

    Steffan Member

    yes i will compare them again
    strange problem
    can i run the script in ssh just to test ?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can try something like this:

    Code:
    sudo -u ispconfig /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter
    If it just 'sits there' and does not return to the prompt, then it's okay. You can quit it with ctrl + c. But I suspect that you get a permission error because user ispconfig is not able to execute it.
     
  17. Steffan

    Steffan Member

    they are the same :-(

    Code:
    drwxr-xr-x  26 root root   4096 Jan 20  2022  var
    
    drwxr-xr-x   8 root      root      20480 Feb 17 15:35 var/www
    
    drwxr-xr-x   9 root    root     4096 Feb 25 09:29 /var/www/php-fcgi-scripts
    
    drwxr-xr-x 2 ispconfig ispconfig  4096 Feb 25 04:17 /var/www/php-fcgi-scripts/ispconfig
    
    and still:
    500 internal server error
    mod_fcgid: error reading data from FastCGI server
    End of script output before headers: index.php
     
  18. Steffan

    Steffan Member

    if i run:
    Code:
    sudo -u ispconfig /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter
    it just sit there till i stop it.
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Strange, so php fcgi seems to be working fine, and it is accessible from ispconfig user.
     
  20. Steffan

    Steffan Member

    well i gave up and changed the config files to wordk with php-fpm. that is working now, only the /mail tab is not working so i missed something :)
     

Share This Page