[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Can't locate <module>.pm in @INC even though it path exists and
From:       ArulJothi <aruljothi () gmail ! com>
Date:       2010-12-18 14:18:07
Message-ID: AANLkTin=9bkZBd6o9Jk9fFfUWP_Y6yaZzysGicG9hfp5 () mail ! gmail ! com
[Download RAW message or body]

Torsten Fortsch,

 I just found the solution, it is very silly. /opt/optimtools points to a
directory under a user home directory which does not have enough permission=
s
on home directory to read.

 Anyway thanks for the effort.

Thanks & Regards,,
Aruljothi.S

2010/12/18 ArulJothi <aruljothi@gmail.com>

> Torsten Fortsch,
>
>  Thanks for looking into the issue.
>
>  I think i am running using mod_perl and not mod_cgi, but How to identify
> it properly.
>
>  Anyway here is my error details
>
>  *URL of my execution:* http://localhost/opt/bi.pl
>
>  *Content of bi.pl:*
>  $ cat bi.pl
>     use od_os;
>     print "hi\n";
>
> * Location of od_os.pm on web server*
>  $ ls /opt/tools/perl/od_cmn/lib/od_os.pm
> /opt/tools/perl/od_cmn/lib/od_os.pm
>
> * Error on Apache server log*
> [Sat Dec 18 18:41:38 2010] [error] Can't locate od_os.pm in @INC (@INC
> contains: /opt/tools/perl/cmn/lib /opt/tools/perl/od_cmn/lib
> /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0
> /usr/lib/perl5/site_perl . /etc/httpd) at /var/www/optim/bi.pl line
> 1.\nBEGIN failed--compilation aborted at /var/www/optim/bi.pl line 1.\n
>
> Thanks & Regards,
> Aruljothi.S
>
> 2010/12/18 Torsten F=F6rtsch <torsten.foertsch@gmx.net>
>
> On Saturday, December 18, 2010 08:17:43 ArulJothi wrote:
>> >  When i execute Apache error log reports that it cannot locate the
>> module
>> > in @INC path even though the path very much exists and i am able to ru=
n
>> > the script without any issues outside mod_perl
>> >
>> >  Basically, Here is my setup
>> >
>> >  1) Modules are located under /opt/tools/perl/lib
>> >  2) @INC containts /opt/tools/perl/lib
>> >               - This is also confirmed by http://localhost/perl-status
>> >  3) Web perl scripts are located at /var/www/perl and apache is proper=
ly
>> > configured
>> >               - This is confirmed by executing a script which does not
>> > depend on any external modules
>> >  4) Now if i execute a perl script which has "use <module>;" pragma, i=
t
>> > fails if this module is located under custom path, but works well for
>> > modules which are intalled with perl distribution
>>
>> Are you sure the scripts are run by mod_perl instead of mod_cgi? If you
>> are
>> using mod_cgi use SetEnv to propagate the custom search path to the
>> module.
>>
>> Torsten F=F6rtsch
>>
>> --
>> Need professional modperl support? Hire me! (http://foertsch.name)
>>
>> Like fantasy? http://kabatinte.net
>>
>
>

[Attachment #3 (text/html)]

Torsten Fortsch,<br><br> I just found the solution, it is very silly. /opt/optimtools \
points to a directory under a user home directory which does not have enough \
permissions on home directory to read.<br><br> Anyway thanks for the effort.<br> \
<br>Thanks &amp; Regards,,<br>Aruljothi.S<br><br><div class="gmail_quote">2010/12/18 \
ArulJothi <span dir="ltr">&lt;<a \
href="mailto:aruljothi@gmail.com">aruljothi@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Torsten Fortsch,<br><br> Thanks for looking into the \
issue.<br><br> I think i am running using mod_perl and not mod_cgi, but How to \
identify it properly.<br><br> Anyway here is my error details<br><br> <b>URL of my \
execution:</b> <a href="http://localhost/opt/bi.pl" \
target="_blank">http://localhost/opt/bi.pl</a><br>

<br> <b>Content of <a href="http://bi.pl" target="_blank">bi.pl</a>:</b><br> $ cat <a \
href="http://bi.pl" target="_blank">bi.pl</a><br>    use od_os;<br>    print \
&quot;hi\n&quot;;<br><br><b> Location of <a href="http://od_os.pm" \
target="_blank">od_os.pm</a> on web server</b><br>

 $ ls /opt/tools/perl/od_cmn/lib/<a href="http://od_os.pm" \
target="_blank">od_os.pm</a> <br>/opt/tools/perl/od_cmn/lib/<a href="http://od_os.pm" \
target="_blank">od_os.pm</a><br><br><b> Error on Apache server log</b><br>[Sat Dec 18 \
18:41:38 2010] [error] Can&#39;t locate <a href="http://od_os.pm" \
target="_blank">od_os.pm</a> in @INC (@INC contains: /opt/tools/perl/cmn/lib \
/opt/tools/perl/od_cmn/lib \
/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi \
/usr/local/lib/perl5/site_perl/5.10.0 \
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi \
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl \
/usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 \
/usr/lib/perl5/site_perl . /etc/httpd) at /var/www/optim/<a href="http://bi.pl" \
target="_blank">bi.pl</a> line 1.\nBEGIN failed--compilation aborted at \
/var/www/optim/<a href="http://bi.pl" target="_blank">bi.pl</a> line 1.\n<br>

<br>Thanks &amp; Regards,<br>Aruljothi.S<br><br><div class="gmail_quote">2010/12/18 \
Torsten Förtsch <span dir="ltr">&lt;<a href="mailto:torsten.foertsch@gmx.net" \
target="_blank">torsten.foertsch@gmx.net</a>&gt;</span><div> <div></div><div \
class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div>On Saturday, December \
18, 2010 08:17:43 ArulJothi wrote:<br> &gt;  When i execute Apache error log reports \
that it cannot locate the module<br> &gt; in @INC path even though the path very much \
exists and i am able to run<br> &gt; the script without any issues outside \
mod_perl<br> &gt;<br>
&gt;  Basically, Here is my setup<br>
&gt;<br>
&gt;  1) Modules are located under /opt/tools/perl/lib<br>
&gt;  2) @INC containts /opt/tools/perl/lib<br>
&gt;               - This is also confirmed by <a href="http://localhost/perl-status" \
target="_blank">http://localhost/perl-status</a><br> &gt;  3) Web perl scripts are \
located at /var/www/perl and apache is properly<br> &gt; configured<br>
&gt;               - This is confirmed by executing a script which does not<br>
&gt; depend on any external modules<br>
&gt;  4) Now if i execute a perl script which has &quot;use &lt;module&gt;;&quot; \
pragma, it<br> &gt; fails if this module is located under custom path, but works well \
for<br> &gt; modules which are intalled with perl distribution<br>
<br>
</div>Are you sure the scripts are run by mod_perl instead of mod_cgi? If you are<br>
using mod_cgi use SetEnv to propagate the custom search path to the module.<br>
<br>
Torsten Förtsch<br>
<font color="#888888"><br>
--<br>
Need professional modperl support? Hire me! (<a href="http://foertsch.name" \
target="_blank">http://foertsch.name</a>)<br> <br>
Like fantasy? <a href="http://kabatinte.net" \
target="_blank">http://kabatinte.net</a><br> \
</font></blockquote></div></div></div><br> </blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic