LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 574|回复: 0

如何通过apache使用perl语言写成的脚本?

[复制链接]
发表于 2005-5-26 14:56:53 | 显示全部楼层 |阅读模式
我的用的是AS3,使用的都是系统自带的rpm包,已经完全安装了
然后把http.conf里面的
[PHP]<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options Indexes ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>
AddHandler cgi-script .cgi .pl
[/PHP]
就更改了这些东西
可是http://localhost/cgi-bin/test.pl的话不能显示
提示:
[PHP]
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@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.0.46 (Red Hat) Server at 10.64.112.211 Port 80

[/PHP]

我的test.pl是这样写的,在shell下能运行:
[PHP]
#!/usr/bin/perl
foreach $key (sort keys %ENV){
print qq|The value of $key is $ENV{"$key"}n|;
}
[/PHP]

apache的error日志里提示
[PHP]
[Thu May 26 11:34:30 2005] [error] [client 10.64.112.214] malformed header from script.
Bad header=The value of DOCUMENT_ROOT is : test.pl
[/PHP]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表