Sambar 服务器问题

Sambar 服务器问题

Sambar 服务器问题
我在windows下安装了sambar,我在 D:\sambar\cgi-bin中用了一个测试程序

#######################################

#!/usr/bin/perl
# Only allow localhost to print environment variables.
# (ONLY remove after reading the syshelp/security.htm documentation)
$host_test = $ENV{'REMOTE_ADDR'};
if (!($host_test eq '127.0.0.1'))
{
print "Only localhost is allowed to use this script!\n";
exit(1);
}

print<<END;
Sambar Server CGI Environment Variables
<P>
<table border=0 cellpadding=2>
<tr><td>GATEWAY_INTERFACE:</td><td> $ENV{'GATEWAY_INTERFACE'}</td></tr>
<tr><td>PATH_INFO: </td><td> $ENV{'PATH_INFO'} </td></tr>
<tr><td>QUERY_STRING: </td><td> $ENV{'QUERY_STRING'} </td></tr>
<tr><td>REMOTE_ADDR: </td><td> $ENV{'REMOTE_ADDR'} </td></tr>
<tr><td>REMOTE_HOST: </td><td> $ENV{'REMOTE_HOST'} </td></tr>
<tr><td>REMOTE_USER: </td><td> $ENV{'REMOTE_USER'} </td></tr>
<tr><td>REQUEST_METHOD: </td><td> $ENV{'REQUEST_METHOD'} </td></tr>
<tr><td>DOCUMENT_NAME: </td><td> $ENV{'DOCUMENT_NAME'} </td></tr>
<tr><td>DOCUMENT_URI: </td><td> $ENV{'DOCUMENT_URI'} </td></tr>
<tr><td>SCRIPT_NAME: </td><td> $ENV{'SCRIPT_NAME'} </td></tr>
<tr><td>SERVER_NAME: </td><td> $ENV{'SERVER_NAME'} </td></tr>
<tr><td>SERVER_PORT: </td><td> $ENV{'SERVER_PORT'} </td></tr>
<tr><td>SERVER_PROTOCOL: </td><td> $ENV{'SERVER_PROTOCOL'} </td></tr>
<tr><td>SERVER_SOFTWARE: </td><td> $ENV{'SERVER_SOFTWARE'} </td></tr>
<tr><td>CONTENT_LENGTH: </td><td> $ENV{'CONTENT_LENGTH'} </td></tr>
<tr><td>HOME: </td><td> $ENV{'HOME'} </td></tr>
</table>
END

###################################################

我把文件的扩展名保存为 test.cgi
我通过 http://localhost/cgi-bin/test.cig 访问test.cgi但是系统报错:
An internal system error has occurred which prevents us from responding to your request.
怎样才能正常显示啊
忘了 print 'Content-Type.
忘了 print 'Content-Type 了,搜索下。