Perl 库不适用于 WampServer

Perl library not working on WampServer

我正在使用 WampServer 和 Perl 为大学项目开发​​网站。

一些细节:

我遵循了所有 Apache httpd.conf 指令来启用 .cgi.pl 脚本。

名为 printenv.pl 的基本 Perl 脚本正在运行:

#!perl

use strict;
use warnings;

print "Content-type: text/plain; charset=iso-8859-1\n\n";

foreach my $var ( sort( keys(%ENV) ) ) {

    my $val = $ENV{$var};

    $val =~ s|\n|\n|g;
    $val =~ s|"|\"|g;

    print "${var}=\"${val}\"\n";
}

每当我尝试通过 use XML::LibXML 在我的脚本上使用我的库时,生成的网站页面都会显示 500 internal server error.

XML:LibXML 在 CPAN 上是最新的,我也尝试过其他几个库。

这是 Apache 错误日志:

[Wed May 04 23:44:24.036757 2016] [authz_core:error] [pid 3892:tid 896] [client ::1:54937] AH01630: client denied by server configuration: C:/Apache24, referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:24.038757 2016] [authz_core:error] [pid 3892:tid 912] [client ::1:54938] AH01630: client denied by server configuration: C:/Apache24, referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:24.039757 2016] [authz_core:error] [pid 3892:tid 920] [client ::1:54939] AH01630: client denied by server configuration: C:/Apache24, referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:24.040757 2016] [authz_core:error] [pid 3892:tid 904] [client ::1:54940] AH01630: client denied by server configuration: C:/Apache24, referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:25.260757 2016] [cgi:error] [pid 3892:tid 904] [client ::1:54940] End of script output before headers: prova.pl, referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:25.261757 2016] [cgi:error] [pid 3892:tid 904] [client ::1:54940] AH01215: Can't locate XML/LibXML.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/msys /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/msys /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at C:/wamp/www/IMAS-master - Copia/cgi-bin/prova.pl line 3., referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/
[Wed May 04 23:44:25.261757 2016] [cgi:error] [pid 3892:tid 904] [client ::1:54940] AH01215: BEGIN failed--compilation aborted at C:/wamp/www/IMAS-master - Copia/cgi-bin/prova.pl line 3., referer: http://localhost/IMAS-master%20-%20Copia/cgi-bin/

我已经找了至少 10 个小时的解决方案,但我真的找不到任何解决方案

您似乎正在查看两个不同的 perl 安装。您没有在服务器上安装 XML::LibXML