Perl库不能在WampServer上运行

时间:2016-05-04 22:01:15

标签: apache perl wamp internal-server-error xml-libxml

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

一些细节:

  • 使用Windows Vista
  • 最新的Strawberry Perl安装在C:\ Strawberry \ perl \ bin \ perl
  • 在C:\ wamp
  • 上安装了Wamp 2.5 32位

我按照所有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个小时的解决方案,但我真的找不到任何

1 个答案:

答案 0 :(得分:2)

您似乎正在寻找两种不同的perl安装。您没有在服务器上安装XML::LibXML