gpt4 book ai didi

perl - 当通过服务器端包含调用 Perl 时,什么导致 "suexec policy violation"?

转载 作者:行者123 更新时间:2023-12-04 00:29:40 26 4
gpt4 key购买 nike

我正在处理从服务器端调用的 Perl 脚本,该脚本包含在 Apache 2 服务器上。该脚本正在显示通用的“内部服务器错误”页面,而不是向我显示实际错误。当我检查 Apache 错误日志时,我看到以下消息:

unable to include "/foobar/index.pl" in parsed file /home/foouser/domains/foosite.com/public_html/foobar/index.shtml, referer: http://www.foosite.com/foobar/
suexec policy violation: see suexec log for more details, referer: http://www.foosite.com/foobar/
Premature end of script headers: settings.pl, referer: http://www.foosite.com/foobar/
如何让 Perl 脚本显示错误而不是“内部服务器错误”?
更新:
我应该为此提出一个单独的问题,因为我后来了解到这确实会向浏览器发送错误( thanks brian ):
use CGI::Carp qw(fatalsToBrowser);
但是,如果问题出在 Apache 配置而不是 Perl 脚本上,那么错误将不会发送到浏览器,因为 Perl 代码没有被解释。在这种情况下,我们可以看出我遇到了 Apache 错误(而不是 Perl 错误),因为这一行:
 suexec policy violation: see suexec log for more details
当 Apache 在 SUexec 模式下运行时会发生这种情况(这对于共享主机来说似乎很常见)。我不确定究竟是什么改变了导致这个错误,但这就是我想要找出的。

最佳答案

可能您正在使用共享主机并且您遇到此问题是因为您的 脚本目录脚本文件 确实拥有除 755 之外的其他权利.
这是一个 case从荷兰语翻译过来的。

关于perl - 当通过服务器端包含调用 Perl 时,什么导致 "suexec policy violation"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2033726/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com