gpt4 book ai didi

perl - CGI 脚本未运行,内部服务器错误 (500) 错误

转载 作者:太空宇宙 更新时间:2023-11-03 17:15:24 25 4
gpt4 key购买 nike

我正在尝试运行一个 cgi 脚本,它是一个很长的脚本,所以我不会粘贴到这里,但它可以在我的其他服务器上运行,但是由于某种原因,当我尝试在我的新服务器上运行它时,出现内部服务器错误 (500) ,当我检查 apache 日志时,我得到的是:

[Fri Mar 30 08:38:29 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Mar 30 08:38:29 2012] [error] [client 199.212.76.124] Premature end of script headers: test.cgi
[Fri Mar 30 08:38:29 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:11 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Mar 30 08:41:11 2012] [error] [client 199.212.76.124] Premature end of script headers: test.cgi
[Fri Mar 30 08:41:11 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:12 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Mar 30 08:41:12 2012] [error] [client 199.212.76.124] Premature end of script headers: test.cgi
[Fri Mar 30 08:41:12 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:15 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Mar 30 08:41:15 2012] [error] [client 199.212.76.124] Premature end of script headers: test.cgi
[Fri Mar 30 08:41:15 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:20 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/upload.cgi' failed
[Fri Mar 30 08:41:20 2012] [error] [client 199.212.76.124] Premature end of script headers: upload.cgi
[Fri Mar 30 08:41:20 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:21 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/upload.cgi' failed
[Fri Mar 30 08:41:21 2012] [error] [client 199.212.76.124] Premature end of script headers: upload.cgi
[Fri Mar 30 08:41:21 2012] [error] [client 199.212.76.124] File does not exist: /var/www/htdocs/favicon.ico
[Fri Mar 30 08:41:29 2012] [error] [client 199.212.76.124] (2)No such file or directory: exec of '/var/www/cgi-bin/upload.cgi' failed, referer: http://bla.com
[Fri Mar 30 08:41:29 2012] [error] [client 199.212.76.124] Premature end of script headers: upload.cgi, referer: http://bla.com

我已经尝试了一切,chmod 文件,重新安装 perl 模块,重新检查配置等等!!!!想不通哪里错了!!!但我可以保证脚本没有损坏!

问候

最佳答案

尝试运行:

perl -c /var/www/cgi-bin/upload.cgi

引用自 perldoc perlrun:

   -c   causes Perl to check the syntax of the program and then exit
without executing it. Actually, it will execute "BEGIN",
"UNITCHECK", "CHECK", and "use" blocks, because these are
considered as occurring outside the execution of your program.
"INIT" and "END" blocks, however, will be skipped.

关于perl - CGI 脚本未运行,内部服务器错误 (500) 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9937213/

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