I have a WordPress installation on my server where I’m using Virtualmin with version PHP7 (main version) and PHP56 (secondary). The problem I’m facing is with the xmlrpc.php:

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://example.com/xmlrpc.php?for=jetpack&token=sometokenhere
End of script output before headers: xmlrpc.php, referer: https://example.com/xmlrpc.php?for=jetpack&token=sometokenhere

This have been happening since I upgraded to PHP version 7. If I switch back to 5.6, the calls to xmlrpc works just fine.

When I ran httpd -V with a non-sudo user, I got the following error:

SuexecUserGroup configured, but suEXEC is disabled: Invalid owner or file mode for /usr/sbin/suexec

… and that was happening because of incorrect permissions, which were 510. I have changed permissions of suexec to 4755 and now it looks like this -rwsr-xr-x 1 root apache 15352 Jul 19 2016 /usr/sbin/suexec and the error is gone.

After this change, if I run httpd -V with a non-sudo user, I get a new error:

AH00112: Warning: DocumentRoot [/home/mydomain_com/public_html] does not exist
AH00526: Syntax error on line 378 of /etc/httpd/conf/httpd.conf:
Wrapper /home/mydomain_com/fcgi-bin/php5.6.fcgi cannot be accessed: (13)Permission denied
  • Directory /home/mydomain_com/public_html exists
  • Line 378: FCGIWrapper /home/mydomain_com/fcgi-bin/php7.1.fcgi .php
  • Permissions: -rwxr-xr-x 1 mydomain_com mydomain_com 241 May 3 09:29 /home/butcaru_com/fcgi-bin/php5.6.fcgi

This error occures when I run httpd -V with a user that isn’t associated with a domain. If I login with mydomain_com user and run httpd -V the error isn’t about mydomain.com anymore, is about another hosted domain (that doesn’t have a WordPress installation for any matter).

So this isn’t something related to a specific domain/CMS. I think this is a misconfiguration of PHP7.

What are your thoughts on this?

Read more here: WordPress, Virtualmin & PHP7: mod_fcgid: error reading data from FastCGI server


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: