今天配了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. codeforces Round #389(Div.2)C Santa Claus and Robot(思维题)

    题目链接:http://codeforces.com/contest/752/problem/C 题意:给出一系列机器人的行动方向(机器人会走任意一条最短路径),问最少标记几个点能让机器人按这个 路径 ...

  2. kmp算法学习 与 传参试验(常回来看看)

    之前在codeforces上做了一道类似KMP的题目,但由于之前没有好好掌握,现在又基本忘记,并没能解答.下面是对KMP算法的一点小总结. 首先KMP算法的核心是纸在匹配过程中,利用模式串的前后缀来加 ...

  3. 在Linux中增加swap空间

    转自: http://blog.csdn.net/chinalinuxzend/article/details/1759593 在Linux中增加swap空间 在安装Linux的时候,不知道swap空 ...

  4. PHP 实现字符串表达式计算

    什么是字符串表达式?即,将我们常见的表达式文本写到了字符串中,如:"$age >= 20",$age 的值是动态的整型变量. 什么是字符串表达式计算?即,我们需要一段程序来执 ...

  5. 【LeetCode】[0002] 【两数之和】

    题目描述 思路分析 测试用例 Java代码 代码链接 题目描述 给出两个非空 的链表用来表示两个非负的整数.其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字.如果 ...

  6. 自己在WEB学习过程中遇到的问题

    问题一: 下面这两段代码差别不大,为何test1结果不同: 代码1: public void doGet(HttpServletRequest request, HttpServletResponse ...

  7. JSP标签介绍

    JSP标签也称之为Jsp Action(JSP动作)元素,它用于在Jsp页面中提供业务逻辑功能,避免在JSP页面中直接编写java代码,造成jsp页面难以维护. jsp的常用标签有以下三个 <j ...

  8. Swift从入门到精通第十一篇 - 初始化 初识

    初始化(学习笔记) 环境Xcode 11.0 beta4 swift 5.1 初始化 初始化是类.结构体.枚举生成实例的过程,为该类的每个存储属性设置初始值,有些在实例使用前的设置或初始化也可在此实现 ...

  9. 【第十一篇】这一篇来说说MVC+EF+easyui datagrid的查询功能

    老规矩 直接上代码 <form class="form-horizontal"> <div class="box-body"> < ...

  10. 大数据平台搭建 - cdh5.11.1 - hbase集群搭建

    一.简介 HBase是一种构建在HDFS之上的分布式.面向列的存储系统.在需要实时读写.随机访问超大规模数据集时,可以使用HBase. 尽管已经有许多数据存储和访问的策略和实现方法,但事实上大多数解决 ...