“标题前的脚本输出结束"阿帕奇的错误 [英] "End of script output before headers" error in Apache
本文介绍了“标题前的脚本输出结束"阿帕奇的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试访问我的 Perl 脚本时,Windows 上的 Apache 给我以下错误:
Apache on Windows gives me the following error when I try to access my Perl script:
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
End of script output before headers: sample.pl
If you think this is a server error, please contact the webmaster.
Error 500
localhost
Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.3
这是我的示例脚本
#!"C:\xampp\perl\bin\perl.exe"
print "Hello World";
但不适用于浏览器
推荐答案
检查文件权限.
我在具有错误权限设置的 Linux 机器上遇到了完全相同的错误.
I had exactly the same error on a Linux machine with the wrong permissions set.
chmod 755 myfile.pl
解决了问题.
这篇关于“标题前的脚本输出结束"阿帕奇的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文