The specified CGI application misbehaved by not returning a complete set of HTTP headers

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了The specified CGI application misbehaved by not returning a complete set of HTTP headers脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

错误报告:


The sPEcified CGI application misbehaved by not returning a complete set of HTTP headers
意思是:(http协议的CGI模式运行不正确) 因为perl脚本的第一句中不支持 -wT 参数,将所有的 -wT 替换成 -w 即可
即:将 #!/usr/bin/perl –wT 替换为:将 #!/usr/bin/perl –w
这是代表PHP是以CGI模试运行的 在PHP.ini找到 gi.force_redirect 把前面的分号去掉 把值改成0就行了。 再次运行就可以了,这是PHP另一种运行模式的配置方法

今天遇到的PHP错误


CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. 最后解决办法是将PHP的CGI方式改为isapi方式。

环境:windows xp SP3+IIS5.1+ActivePerl 5.10.0

安装BugZilla后,配置CGI,运行后错误如下: CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers IT did return are: "-t" is on the #! line,it must also be used on the command line at E:\bugzilla-3.4.2\bugzilla-3.4.2\index.cgi line 1. 错误报告:
The specified CGI application misbehaved by not returning a complete set of HTTP headers
意思是:(http协议的CGI模式运行不正确) 因为perl脚本的第一句中不支持 -wT 参数,将所有的 -wT 替换成 -w 即可
即:将 #!/usr/bin/perl –wT 替换为:将 #!/usr/bin/perl –w
这是代表PHP是以CGI模试运行的 在PHP.ini找到 gi.force_redirect 把前面的分号去掉 把值改成0就行了。 PS:另外解决办法
修改IIS设置里,主目录选项卡->应用程序设置->选择CGI,之后在添加/编辑应用程序扩展映射名:将CGI可执行文件名写为:
D:\Perl\bin\perl.exe -x -wT “%s%s
(注:这里我的Perl安装在D:\Perl目录里)
这个样子就不需要更改BUGZilla的文件

脚本宝典总结

以上是脚本宝典为你收集整理的The specified CGI application misbehaved by not returning a complete set of HTTP headers全部内容,希望文章能够帮你解决The specified CGI application misbehaved by not returning a complete set of HTTP headers所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:headersHTTP