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
/home/mydomain_com/public_html
existsFCGIWrapper /home/mydomain_com/fcgi-bin/php7.1.fcgi .php
-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?
This is a known issue with Jetpack's JSON API and PHP7 and it seems to be caused by opcache. Details on issue here.
I have disabled opcache by creating a .user.ini
file inside Wordpress's root dir containing the following line:
opcache.enable=0
and no more errors, Wordpress Android App works :)
More on disabling opcache temporary here.