免费注册 查看新帖 |

Chinaunix

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

紧急求高手帮忙,内部服务器错误,啥原因????? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-21 09:52 |显示全部楼层 |倒序浏览
软件环境:WindowsXP,Activeperl5.8,Apache2.2.6

apply.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" c />
<title>申请页面</title>
</head>
<body>
<p align="center"><font face="宋体" size="6">申请页面</font></p>
<form action="http://127.0.0.1/cgi-bin/apply.pl" method="post">
<p>请填写申请</p>
<p>你的姓名:<input type="text" name="name" size="20"></p>
<p>你的性别:<input type="radio" value="male" checked name="sex">男  <input type="radio" value="female" name="sex">女</p>
<p>你的受教育程度:
<select name="education" size="1">
<option value="gaozhong">高中</option>
<option value="dazhuan">大专</option>
<option value="benke">本科</option>
<option value="shuoshi">硕士</option>
<option value="boshi">博士</option>
</select>
</p>
<p>你的兴趣与爱好:<input type="checkbox" name="lvyou" value="on">旅游  <input type="checkbox" name="tiyu" value="on">体育  </p>
<p><input type="submit" value="提交" name="B1">  <input type="reset" value="重新输入" name="B2"></p>
</form>
</body>
</html>

apply.pl:

#!/perl/bin/perl
use strict;
my %input=readInput();
print <<"EOF";
content-type:text/html\n
<html>
<body>
浏览器发送的数据为:$input{'data'} <br>
解析后的数据是:<br>
EOF
foreach(keys %input)
{print "你输入的$_值为:$input{$_} <br>" unless($_ eq 'data');}
print "</body></html>";
#########################################################################
sub readInput()
#########################################################################
{my(%field,$in,$name,$value,@pairs);
  if ($ENV{'REQUEST_METHOD'} eq 'POST')
  {read(STDIN,$in,$ENV{'CONTENT_LENGTH'});}
  elsif ($ENV{'REQUEST_METHOD'} eq 'GET')
  {$in=$ENV{'QUERY_STRING'};}
  else {return undef;}
  $field{'data'}=$in;
      @pairs=split(/&/,$in);
      foreach (@pairs)
      {$_ = ~s/\+//g;
       ($name,$value)=split(/=/,$_);
       $value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eq;
       $name=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eq;
       $field{$name}=$value;
      }
return(%field);

错误:
执行http://127.0.0.1/apply.html应该执行apply.pl
却显示:
Internal Server ErrorThe server encountered an internal error ormisconfiguration and was unable to completeyour request.
Please contact the server administrator, root@superman.com and inform them of the time the error occurred,and anything you might have done that may havecaused the error.
More information about this error may be availablein the server error log.

那位高手给看看哪错了?????谢谢!

httpd.conf在附件中

httpd.rar

6.36 KB, 下载次数: 32

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP