Dear all,
Running this piece of code is never a problem in Apache 1.3.
#!/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";
It can recognize the path as set in .htaccess below:
SetEnv PERL5LIB /home/monkfan/lib/perl5/site_perl/5.8.5/i386-linux-th
+read-multi:/home/monkfan/lib/perl5/site_perl/5.8.5
Then I upgraded from Apache 1.3 to 2.2 on the same Linux box. But
now with Apache 2.2, it can't locate the location of those modules as set in the identical htaccess.
Does anybody has experience of setting PERL5LIB for htaccess in Apache 2.2? How can I resolve the problem above?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|