RE: Problem Accessing Perl ModulesThrough .htaccess 
Hi Jeff,

 
> By the way,why don't include this line in your CGI script?
> use lib '/the/module/path';

Tried that too. Still give the same problem. Although I thought 
it's the .htaccess job to locate those Perl's lib path.

>you may need to set the "SetEnv" direction in the httpd.conf.
How do you do that?
I can't see any directive related to that. Please advice.

--
Edward WIJAYA
SINGAPORE


2007/4/9, Wijaya Edward :
>
>
> Dear experts,
>
> 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;
> use IO::String;
> use File::Slurp qw(read_file);
> 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:
> http://bioinfo-z.comp.nus.edu.sg/Test/cgi-bin/hellom.cgi
>
> As you can see from that link it shows that it can't locate Acme::Spork,
> at the shown path there. But I have set .htaccess to contain this:
>
> SetEnv PERL5LIB
> /home/sadm/lib/site_perl/sun4-solaris-64int:/home/sadm/lib/site_perl/
>
> I have the .htaccess here: /usr/local/apache/htdocs/Test
>
>
> Moreover checking the location of the module it consistently shows
>
> the correct path:
> sadm@bioinfo-z:~$ perldoc -l Acme::Spork
> /home/sadm/lib/site_perl/Acme/Spork.pm
>
> My question is why my Apache can't locate the location
> given the correct .htaccess? Thus my script won't work?
>
> My httpd.conf is this: http://dpaste.com/8163/plain/
> My modules.conf is this: http://dpaste.com/8164/plain/
>
> Hope to hear from you again
>
>
>
>
>
>
>
> ------------ Institute For Infocomm Research - Disclaimer -------------
> This email is confidential and may be privileged.  If you are not the
> intended recipient, please delete it and notify us immediately. Please do
> not copy or use it for any purpose, or disclose its contents to any other
> person. Thank you.
> --------------------------------------------------------
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>


-- 
mailto: pangj@earthlink.net
http://home.arcor.de/jeffpang/


------------ Institute For Infocomm Research - Disclaimer -------------
This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
--------------------------------------------------------

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


