今天配了CGI服务器,打开CGI报错:
[Wed Jun 02 13:57:21 2010] [error] [client 192.168.0.1] malformed header from script. Bad header=Hello,World!: index.cgi
[Wed Jun 02 13:57:21 2010] [error] [client 192.168.0.1] malformed header from script. Bad header=Hello,World!: index.cgi
[Wed Jun 02 13:57:21 2010] [error] [client 192.168.0.1] malformed header from script. Bad header=Hello,World!: index.cgi
 
    在服务器上用perl支持文件是正确的,权限也有了,后面在网上查到是文件头有问题。CGI文件第一句一定要先定义内型,然后跟着是一个新空行,在下来就是主程序了,由于我在定义内型后没有输出文件头及换行,直接就是主程序,所以一才导致上面出现的错误。
    CGI不执行,APACHE错误日志:Premature end of script headers,或 malformed header from script. Bad headerXXX,这种情况,还是检查一下CGI输出的第一句话是啥。应该是形如:
       Content-type:text/html\n\n
       注意:声明好Content-type后要输出两个空行。

malformed header from script. Bad header的解决方法的更多相关文章

  1. PHP错误Warning: Cannot modify header information - headers already sent by解决方法

    这篇文章主要介绍了PHP错误Warning: Cannot modify header information - headers already sent by解决方法,需要的朋友可以参考下 今天在 ...

  2. PHP提示Cannot modify header information - headers already sent by解决方法

    PHP提示Cannot modify header information - headers already sent by解决方法 因为 header();发送头之前不能有任何输出,空格也不行, ...

  3. npm不能安装任何包,报错:npm WARN onload-script failed to require onload script npm-autoinit/autoinit及解决方法

    想要利用Hexo搭建一个博客,但是安装时npm一直报错,不仅仅是Hexo包,连别的其他包也不行,会提示下面的一堆错误 npm WARN onload-script failed to require ...

  4. invalid END header (bad central directory offset) 异常解决方法

    今天版本升级时,一个ear包在传到aix下,weblogic后启动出现 invalid END header (bad central directory offset) 后来才发下是文件传输中出现了 ...

  5. Nginx 502错误:upstream sent too big header while reading response header from upstream

    原因: 在使用Shiro的rememberMe功能时,服务器返回response的header部分过大导致. 解决方法: https://stackoverflow.com/questions/238 ...

  6. nginx 自动忽略request中header name包含下划线参数的解决方法

    使用nginx过程中遇到了个问题,就是request中的header name中如果包含下划线会自动忽略掉,导致服务器接收不到该字段的内容,以下为解决方法: nginx默认request的header ...

  7. 安装rpm包时遇到Header V3 DSA signature: NOKEY时解决办法

    安装rpm包,特别是没有GPGkey校验,原因是rpm版本过低导致的. 代码如下: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY ...

  8. 阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决方法

    阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决 ...

  9. 编译安装php时提示Cannot find MySQL header files的解决方法

    php的配置文件中有一行--with-mysql=/usr/local/mysql ,安装的时候提示:configure: error: Cannot find MySQL header files ...

随机推荐

  1. 【牛客Wannafly挑战赛12】 题解

    传送门:https://www.nowcoder.com/acm/contest/79#question 说是比赛题解,其实我只会前三题: 后面的一定补 T1 题意,在一个长度为n的时间内,问如何选择 ...

  2. codeforces 478 D. Red-Green Towers(背包)

    题目链接:http://codeforces.com/problemset/problem/478/D 题意:给出红色方块r个,绿色方块g个,问最高能叠几层等腰三角形,而且每一层的颜色必须相同. 题解 ...

  3. Leetcode之动态规划(DP)专题-详解983. 最低票价(Minimum Cost For Tickets)

    Leetcode之动态规划(DP)专题-983. 最低票价(Minimum Cost For Tickets) 在一个火车旅行很受欢迎的国度,你提前一年计划了一些火车旅行.在接下来的一年里,你要旅行的 ...

  4. Codeforces Round #582 (Div. 3)

    题目链接:https://codeforces.com/contest/1213 A: 题意:给定数的位置,位置为整数,每个数可以向左或右移动一格或者两格,移动一格花费一个硬币,两格不花费硬币,问所有 ...

  5. Java日志框架总结

    1. 前言 从写代码开始,就陆陆续续接触到了许多日志框架,较常用的属于LOG4J,LogBack等.每次自己写项目时,就copy前人的代码或网上的demo.配置log4j.properties或者lo ...

  6. 063 Python必备库-从人机交互到艺术设计

    目录 一.概述 二.Python库之图形用户界面 2.1 PyQt5 2.2 wxPython 2.3 PyGObject 三.Python库之游戏开发 3.1 PyGame 3.2 Panda3D ...

  7. C#委托(delegate、Action、Func、predicate)和事件

    一.前言 刚开始工作的时候,觉得委托和事件有些神秘,而当你理解他们之后,也觉得好像没有想象中的那么难.在项目中运用委托和事件,你会发现他非常棒,这篇博文算是自己对委托和事件的一次梳理和总结. 二.委托 ...

  8. java基础day2

    Java标识符命名规则: 标识符由字母,下划线“_”.美元符号$或数字组成/ 不能以数字开头 区分大小写 不能是关键字 “ 见名知意” 约定俗成的规则 类名:首字母大写变量名:除第一个单词外小写,其他 ...

  9. pytho的traceback的解读

    写 Python 代码的时候,当代码中出现错误,会在输出的时候打印 Traceback  错误信息,很多初学者看到那一堆错误信息,往往都会处于懵逼状态,脑中总会冒出一句,这都是些啥玩意.如果你是第一次 ...

  10. centos7上安装zookeeper

    centos7上安装zookeeper 1 准备工作 1.准备服务器,本次安装采用 centos7系统.内存2G.存储60G的虚拟机服务器一台: 2.服务器安装java环境: 参考文章<cent ...