免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1796 | 回复: 2
打印 上一主题 下一主题

麻烦大伙看看,,一个小小CGI聊天室,运行时错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-30 23:01 |只看该作者 |倒序浏览
$ cat /var/log/apache2/access.log
127.0.0.1 - - [30/Jul/2009:22:30:40 +0800] "POST /cgi-bin/mychart.pl HTTP/1.1" 500 416 "http://localhost/page/bottom.htm" "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"
127.0.0.1 - - [30/Jul/2009:22:30:49 +0800] "POST /cgi-bin/mychart.pl HTTP/1.1" 500 416 "http://localhost/page/bottom.htm" "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"
127.0.0.1 - - [30/Jul/2009:22:40:54 +0800] "POST /cgi-bin/mychart.pl HTTP/1.1" 500 416 "http://localhost/page/bottom.htm" "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"
127.0.0.1 - - [30/Jul/2009:22:52:27 +0800] "POST /cgi-bin/mychart.pl HTTP/1.1" 500 416 "http://localhost/page/bottom.htm" "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"

$ cat /var/log/apache2/error.log
[Thu Jul 30 22:11:21 2009] [error] [client ::1] File does not exist: /var/www/favicon.ico
[Thu Jul 30 22:11:23 2009] [error] [client 127.0.0.1] Premature end of script headers: mychart.pl, referer: http://localhost/page/bottom.htm
[Thu Jul 30 22:30:40 2009] [error] [client 127.0.0.1] Premature end of script headers: mychart.pl, referer: http://localhost/page/bottom.htm
[Thu Jul 30 22:30:50 2009] [error] [client 127.0.0.1] Premature end of script headers: mychart.pl, referer: http://localhost/page/bottom.htm
[Thu Jul 30 22:40:54 2009] [error] [client 127.0.0.1] Premature end of script headers: mychart.pl, referer: http://localhost/page/bottom.htm
[Thu Jul 30 22:52:27 2009] [error] [client 127.0.0.1] Premature end of script headers: mychart.pl, referer: http://localhost/page/bottom.htm
~                  


在页面上的错误提示:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server at 127.0.0.1 Port 80

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2009-07-31 08:32 |只看该作者
Premature end of script headers: mychart.pl
mychart.pl 有html格式输出的问题....可能程序停在某的地方..造成html文档没办法正确输出至Client端..
就会有这个error..
以过去的经验是
在<html>出现之前你print 了某些String..就会有这个Error...

论坛徽章:
0
3 [报告]
发表于 2009-07-31 09:53 |只看该作者
是的。

其实这个错误是APACHE解析不了CGI的输出报出来的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP