mod_fcgid error reading data from FastCGI server

Discussion in 'Installation/Configuration' started by Dennis_sp, Jul 28, 2021.

  1. Dennis_sp

    Dennis_sp Member

    I'm getting this error on one of my websites suddenly while this website has been working fine for years. The website gives a 500 error right now.

    Code:
    [Wed Jul 28 12:51:05.877221 2021] [fcgid:warn] [pid 4566] (104)Connection reset by peer: [client **********:12150] mod_fcgid: error reading data from FastCGI server
    [Wed Jul 28 12:51:05.877277 2021] [core:error] [pid 4566] [client **********] End of script output before headers: index.php
    
    I read somewhere to use this setting for the virtualhost:
    FcgidBusyTimeout 3600
    So i changed that in the Options pane under Apache directives but it didn't help.

    I also checked the permissions of folders and they have the proper client/web ownership.

    Any suggestions here? I need to get this resolved quickly.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try switching to php-fpm mode.
     
  3. Dennis_sp

    Dennis_sp Member

    I tried an ubuntu apt update and apt upgrade but now even more is broken, ISPconfig can't run the server.sh script anymore:

     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You installed a default PHP without MySQL support. Which OS and version do you use? And please post the output of:

    php --version
     
  5. Dennis_sp

    Dennis_sp Member

    Looks like the apt update and upgrade changed it to PHP8:

    In System>System>Web>PHP i see paths pointing to PHP 7.1

    What do you recommend? I can also rollback this machine to a snapshot before i updated.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. Dennis_sp

    Dennis_sp Member

    Thanks! That helped.

    I have some additional PHP issues and warnings now but i think i'll be able to fix those myself. If not i will post back. Thanks again for the quick support!
     
  8. Dennis_sp

    Dennis_sp Member

    After i thought this was solved Wordpress was complaining that i was using an insecure version of PHP so i changed it to PHP7.4 again and no problems until i found out today the website was giving a 500 error again so i had to revert back again to the default PHP version. Any idea how i can fix the above error?
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you install the additional PHP versions from Ondrej Sury repository, they have the security fixes backported. So ignore what Wordpress complains about insecure versions, it only looks at the PHP version number, not what security faults have been fixed.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look at the error.log of the website to find out what the error is.
     
  11. Dennis_sp

    Dennis_sp Member

    What i posted above is the error i found in the log.

    I'm confused about my system now regarding PHP. When i look in System>Additional PHP versions it says i have 7.4 and 5.6 available.
    But i only see them for some sites as options in the dropdown PHP version field to set and for others they are not in the dropdown.

    Then i have another website is not working now because of this error:
    When i change the PHP version for the site with this error. I don't get an error about redis but i get one about ioncube loader missing. Of course i can install that but what would be the correct install path for each PHP version when installing or removing modules like redis and ioncube?
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You must set PHP to PHP-FPM in website settings for the PHP version dropdown to appear.
    The needed PHP modules must be installed for all additional PHP versions, too. But redis and ioncube I would install only for the OS default PHP, and run that for those websites that need them.
     
  13. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    an ioncube install should add the libraries needed for each installed php version.
    you'll need to manually append the relevant path into each php.ini,
    eg
    Code:
    zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so
    
    for /etc/php/7.4/*/php.ini
    Code:
    zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so
    
    for /etc/php/7.3/*/php.ini

    there are no ioncube loaders for php8.0 yet though....
     
  14. Dennis_sp

    Dennis_sp Member

    It looks like my system default is PHP 7.2:
    This is what the server paths are:

    What i find confusing is when i look in ISPConfig>System>Web>PHP setting

    [​IMG]

    I see 7.1 paths, is that unrelated.

    I guess i have to install the missing modules in /usr/lib/php/20170718, what is the command to do so when installing a module?

    Looking at my own notes i had previously installed ioncube like this:

    But when i try to do this for PHP 7.4 i don't see a cli or cgi directory under
     
  15. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    ok, you're adding the ioncube details in a file in conf.d, that's ok, but is that you're full install?
    i would expect to see the same for /etc/php/7.2/apache2/conf.d/00-ioncube.ini and /etc/php/7.2/fpm/conf.d/00-ioncube.ini

    if 7.2 is the system default, i would have expected those paths to have been updated. was an ispconfig_update ran after the dist-upgrade?
    (maybe it doesn't need to change them since the default handler is disabled)

    as for php7.4, have you actually added it? if so how? i would expect to see at least one of the folders apache2/cli/cgi/fpm in /etc/php/7.4 if it was installed from the sury/ondrej php repo.
     
  16. Dennis_sp

    Dennis_sp Member

  17. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    did you change the prefix path when you ran the ./configure command from that guide?
    if not, then you've installed it to /opt/php-7.4 and you need to change any additional php settings in ispconfig and for your ioncube ini files accordingly.
     
  18. Dennis_sp

    Dennis_sp Member

    You are completely right, the guide didn't mention it so i didn' t change the path. How do i install redis, ioncube etc now for php 7.4?
     
  19. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    for ioncube, just change the location you place the ini files to /opt/php7.4/*/conf.d/

    for redis, i assume just installing and enabling php7.4-redis would be enough.
     

Share This Page