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的文件了

(0)

相关推荐

  • List Information About the Binary Files Used by an Application

    Returns the name and product code of binary information (such as bitmaps, icons, executable files, and so on) used by a Windows Installer application. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. F

  • The application has failed...(应用程序配置不正确)

    在我们开发工程中,可能有些情况下,不能在本机进行调试.这个时候我们一般会使用VM(vmware)建立一个虚拟机环境,然后把编译过的程序放在该虚拟机环境下执行调试.可是在某些情况下,不管我们编译的是debug还是release版本,在虚拟机环境中都会报"由于应用程序配置不正确,应用程序未能启动.重新安装应用程序可能会纠正这个问题."(The application has failed to start because its side-by-side configuration is

  • Android开发 -- setTag的妙用和The key must be an application-specific resource id 异常

    tag是view的一个属性,也可以说是view用于存放参数的一个map,对于提高性能和参数传递都有妙用,比如提高listview的性能: 用于缓存item的view 复制代码 代码如下: public View getView(final int position, View convertView, ViewGroup parent) {      ItemViewHolder holder; if (convertView == null) {          holder = new I

  • 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_

  • IIS UNICODE Bug

    一.存在的漏洞1. 微软IIS 4.0 / 5.0 存在扩展UNICODE目录遍历漏洞,该漏洞既是一远程漏洞,同时也是一本地漏洞. 受影响的版本: Microsoft IIS 5.0 + Microsoft Windows NT 2000 Microsoft IIS 4.0 + Microsoft Windows NT 4.0 + Microsoft BackOffice 4.5 - Microsoft Windows NT 4.0 + Microsoft BackOffice 4.0 - Mi

  • PHP安装问题

    安装这节将讲述安装过程中最常见的问题.PHP 适用于 几乎任何的 OS (或许 OSX 之前的 MacOS 除外 ), 和几乎任何的WEB 服务器.要安装PHP, 跟着 发行版里的安装 文件的指引. Windows 用户也应该读install.txt 文件. 这儿也有一些帮助文档 . 1. Unix/Windows: 我的php.ini 应该放在哪? 2. Unix: 我安装了 PHP, 但我每次加载一个文档, 会得到下面的消息: 'Document Contains No Data'! 怎么回

  • asp.net中出现CGI Timeout的解决办法

    复制代码 代码如下: CGI Timeout The specified CGI application exceeded the allowed time for processing. The server has deleted the process. 在iis官方论坛中提到这是由于服务器端会将CGI当作一个可执行文件执行.原帖在此处http://forums.iis.net/t/1147117.aspx 解决方法是将IIS应用程序设置中的执行权限更改为"无"或"纯脚

  • apache php模块整合操作指南

    apache的版本: httpd-2.2.21-win32-x86-no_ssl php的版本: php-5[1].3.8-Win32-VC9-x86 (一) 准备工作 1.先找在D:/amp/php中找到php.ini-development这个文件,然后把它改成php.ini这个文件名 2.用记事本,或editplus将其打开 (二)操作步骤: 1.告诉php所用的扩展模块所在位置 807行 extension_dir = "D:/amp/php/ext" 点我查看 2. 告诉ph

  • Windows Server 2016 PHP运行环境安装配置

    1.下载PHP 官网地址: http://php.net/ 下载地址: http://php.net/downloads.php 2.下载Windows Service Wrapper 官网地址: https://github.com/kohsuke/winsw/ 下载地址: http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/ 3.解压PHP压缩包文件到C盘根目录,并且重命名为php 4.将"winsw-1.19-bin.exe&qu

  • vbs得没公开对象

    WSH中可以运用的InternetExplorer.Application 如例: 原代码: set ie=createobject("internetexplorer.application") msgbox "显示IE" ie.visible=true msgbox "隐藏ie" ie.visible=false msgbox "关闭ie" ie.quit 下面这是internetexplorer.application的

  • Python的requests网络编程包使用教程

    早就听说requests的库的强大,只是还没有接触,今天接触了一下,发现以前使用urllib,urllib2等方法真是太搓了-- 这里写些简单的使用初步作为一个记录 一.下载 官方项目页: https://pypi.python.org/pypi/requests/#downloads 可以从上面直接下载. 二.发送无参数的get请求 >>> r = requests.get('http://httpbin.org/get') >>> print r.text { &q

  • Python开发的HTTP库requests详解

    Requests 是使用 Apache2 Licensed 许可证的 基于Python开发的HTTP 库,其在Python内置模块的基础上进行了高度的封装,从而使得Pythoner进行网络请求时,变得美好了许多,使用Requests可以轻而易举的完成浏览器可有的任何操作. 1. GET请求 # 1.无参数实例 import requests ret = requests.get('https://github.com/timeline.json') print(ret.url) print(re

  • python3模拟百度登录并实现百度贴吧签到示例分享(百度贴吧自动签到)

    baiduclient.py 复制代码 代码如下: import urllib.parseimport gzipimport jsonimport refrom http.client import HTTPConnectionfrom htmlutils import TieBaParserimport httputils as utils # 请求头headers = dict()headers["Connection"] = "keep-alive"heade

随机推荐