我试图运行curl_exec,但出现错误 500。在错误日志中,我有
[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
我在互联网上找到了一个修复建议,说我必须将此片段添加到我的 vhosts.conf 中。由于我的 apache 没有 vhosts.conf 文件,我将其添加到 httpd.conf:
<IfModule mod_fcgid.c>
# 5 minutes for IO timeout, default is 40 seconds
FcgidIOTimeout 300
</IfModule>
但这并没有帮助。我还发现了一个建议,说我必须更改/var/www/cgi-bin/cgi_wrapper/
的权限,但在/var/www/cgi-bin/
文件夹中我没有cgi_wrapper。
我在互联网上搜索了几个小时,但我找不到任何有用的东西。有人知道为什么会发生这种情况吗?
升级 php 解决了这个问题。