Im trying to run curl_exec and I get error 500. In the error log I have
[warn](104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: xxx
[error] Premature end of script headers: myfile.php, referer: xxx
I found a suggestion for fix on the internet saying that I have to add this snippet to my vhosts.conf. Since my apache doesn't have vhosts.conf file I added it to httpd.conf:
<IfModule mod_fcgid.c>
# 5 minutes for IO timeout, default is 40 seconds
FcgidIOTimeout 300
</IfModule>
but it didn't help. Also I found a suggestion saying that I have to change the permissions of /var/www/cgi-bin/cgi_wrapper/
but in the /var/www/cgi-bin/
folder I don't have a cgi_wrapper.
I searched the internet for a couple of hours but I couldn't find anything helpful. Does anybody have any idea why this could be happening?
Upgrading php solved this problem.