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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.