免费注册 查看新帖 |

Chinaunix

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

急:请教关于CGI不能执行的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-24 14:26 |只看该作者 |倒序浏览
环境为sco unix 5.0.7,在浏览器中不能正常执行CGI程序,可以看到HTML网页,错误提示为:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, email@somedomain.com 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/1.3.36 Server at opac.sdjnlib.net Port 80

查看日志为:

[Thu Jan 24 14:20:57 2008] [error] [client 61.179.124.82] malformed header from
script. Bad header=\xb4\xf2\xbf\xaa\xce\xc4\xbc\xfe/u/ilasII_GB\r/webpac/h: /u/i
lasII_GB/webpac/cgi-bin/EnterIlasweb

请教是何原因???

论坛徽章:
0
2 [报告]
发表于 2008-01-24 15:27 |只看该作者
打印html的头了么?

论坛徽章:
0
3 [报告]
发表于 2008-01-24 16:04 |只看该作者
原帖由 hutule110 于 2008-1-24 15:27 发表
打印html的头了么?



怎么讲?

论坛徽章:
0
4 [报告]
发表于 2008-01-24 16:05 |只看该作者
明白了,我可能说得不明白,就是纯html的页面文件可以正常打开,CGI的就打不开.

论坛徽章:
0
5 [报告]
发表于 2008-01-24 16:06 |只看该作者
原帖由 happyrhino 于 2008-1-24 16:04 发表



怎么讲?

use CGI;
$cgi = new CGI;

print $cgi->header();

论坛徽章:
0
6 [报告]
发表于 2008-01-25 09:14 |只看该作者
谢谢,不过,我对CGI不熟悉,只是想知道,为什么CGI不能在sco 5.0.7中正常显示

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
7 [报告]
发表于 2008-01-25 09:39 |只看该作者
有空找个CGI的教程先看看吧...
你输出的HTML没错..但是CGI不只是HTML..还有HTTP Header部分....
HTTP Header内容你应该写错了...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP