我的一个网站客户在下订单时遇到了问题。 当我检查我的错误日志时,我可以看到这个:
[warn] mod_fcgid: read data timeout in 45 seconds, referer: https://myDomain/cart
[error] Premature end of script headers: index.php, referer: https://myDomain/cart
这个错误是什么意思?我应该怎么做才能消除这个错误? Plesk 控制面板中是否有任何设置需要更改?如果我将'Php settings'中的'max_execution_time'更改为3600是否可以解决?
我使用的是 Plesk 12.0.18、CentOS 5.11
最佳答案
该错误表示index.php
文件中的网站代码未能在为Apache FastCGI 模块和/或PHP 设置的时限内执行。
很可能是
index.php
中存在错误,导致它根本无法运行。在这种情况下,您应该在 Plesk > Domains > example.com > PHP Settings 中增加 PHP 错误报告级别并检查脚本本身。该脚本不太可能需要很长时间才能执行。在这种情况下,您可以通过 Plesk 简单地增加超时。要设置 120 秒而不是默认的 45 秒,请执行以下操作:
1.在 Plesk > Domains > example.com > PHP settings 中将 max_execution_time
设置为 120
。
2。通过在 Plesk > Domains > example.com > Apache & Nginx settings > Additional Apache directives 中添加以下 Apache 指令来增加 FastCGI 超时
:
<IfModule mod_fcgid.c>
FcgidIOTimeout 120
</IfModule>
关于timeout - mod_fcgid : read data timeout in 45 seconds and Premature end of script headers: index. php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52169954/