我正在使用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个小时的解决方案,但我真的找不到任何
答案 0 :(得分:2)
您似乎正在寻找两种不同的perl安装。您没有在服务器上安装XML::LibXML