Most revered monks,
I have the following simple Perl script (called "hellom.cgi"):
__BEGIN__
#!/usr/bin/perl
use CGI qw/:standard :html3/;
use CGI::Carp qw( fatalsToBrowser );
$CGI::POST_MAX=1024 * 100; # max 100K posts1
#--------------------------------------------------
# BEGIN {
# if ( $ENV{PERL5LIB} and $ENV{PERL5LIB} =~ /^(.*)$/ ) {
#
# # Blindly untaint. Taintchecking is to protect
# # from Web data;
# # the environment is under our control.
# eval "use lib '$_';" foreach (
# reverse
# split( /:/, $1 )
# );
# }
# }
#--------------------------------------------------
use Acme::Spork;
use Bio::Tools::GuessSeqFormat;
print "Content-type: text/html\n\n";
print "Hello World !! It works.\n";
__END__
Which is stored under:
/usr/local/apache/htdocs/Test/cgi-bin
And the actual website can be accessed
here.
It gives error message like this:
Software error:
Can't locate Acme/Spork.pm in @INC (@INC contains: /home/sadm/lib/site
+_perl/ /home/sadm/lib/site_perl/sun4-solaris-64int /usr/perl5/5.8.4/l
+ib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4
+/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /
+usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendor_perl
+/5.8.4 /usr/perl5/vendor_perl .) at /usr/local/apache/htdocs/Test/cgi
+-bin/hellom.cgi line 25.
BEGIN failed--compilation aborted at /usr/local/apache/htdocs/Test/cgi
+-bin/hellom.cgi line 25.
For help, please send mail to the webmaster (admin@your-domain.com), g
+iving this error message and the time and date of the error.
As you can see from that link it shows that it can't locate Acme::Spork
at the shown path there - although the path stated above (the one under /home) is already consistent with my htaccess path below:
SetEnv PERL5LIB /home/sadm/lib/site_perl/sun4-solaris-64int:/home/sadm
+/lib/site_perl/
The .htaccess is located here:
/usr/local/apache/htdocs/Test.
Moreover checking the location of the module it consistently shows the correct path:
sadm@bioinfo-z:~/lib/site_perl/Acme$ ls
Spork.pm
sadm@bioinfo-z:~/lib/site_perl/Acme$ pwd
/home/sadm/lib/site_perl/Acme
My question is why my Apache can't locate the location
given my correct .htaccess path? Thus my script won't work?
Update: Problem solved. Thanks to
ikegami!.
PS:
My
httpd.conf is
this and
modules.conf is
this.