You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Cocks <bc...@multi-ad.com> on 2003/05/22 20:33:06 UTC
Can't locate SomeModule.pm in @INC, even though its there...
I was wondering if anyone had an explanation for this...
modperl is failing to load modules beyond a certain depth of uses.
Example:
MyHandler uses Mod1 which uses Mod2 which uses.... Mod6
Using the top level module works from the command line. After a quick
search of the archives I put a use statement of a deep level module in
our startup.pl and that fixed things.
I'm just wondering what the source problem is and why what I did worked.
Thanks.
--
Brian Cocks
Senior Software Architect
MultiAd
bcocks@multiad.com
(309)690-5834
Re: Can't locate SomeModule.pm in @INC, even though its there...
Posted by Perrin Harkins <pe...@elem.com>.
Brian Cocks wrote:
> The modules in question aren't Apache modules except the top level one. They are
> all in house written.
This is usually a permissions problem. Check carefully that the user
the web server runs as can get to those files. Often people find a
directory somehwere down the line that is not set correctly.
- Perrin
Re: Can't locate SomeModule.pm in @INC, even though its there...
Posted by Brian Cocks <bc...@multi-ad.com>.
The modules in question aren't Apache modules except the top level one. They are
all in house written. Here is an example error:
[Thu May 22 10:46:18 2003] [error] Can't locate MASI/Email.pm in @INC (@INC cont
ains: /raid/0/www/docs/.handlers /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/lo
cal/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local
/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/p
erl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/s
ite_perl . /raid/0/www/apache/ /raid/0/www/apache/lib/perl) at /usr/local/lib/pe
rl5/site_perl/5.6.0/MASI/Creator/Connection.pm line 26.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/C
reator/Connection.pm line 26.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Creat
or/Spread.pm line 26.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/C
reator/Spread.pm line 26.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Creat
or/Document.pm line 25.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/C
reator/Document.pm line 25.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Creat
or/Session.pm line 24.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/C
reator/Session.pm line 24.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Creat
or/AdCreator.pm line 7.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/C
reator/AdCreator.pm line 7.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Globa
lSession.pm line 45.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/G
lobalSession.pm line 45.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/MASI/Accou
nts/AuthenAccount.pm line 11.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/MASI/A
ccounts/AuthenAccount.pm line 11.
Compilation failed in require at (eval 192) line 3.
The top level module (MASI::Accounts::AuthenAccount) is the handler. The rest
are apache independent. To test things I created a simple handler that used the
module MASI::GlobalSession and did nothing else. The same error occured. I then
switched the use statement to the next one down the chain
(MASI::Creator::AdCreator). Same thing except that MASI::Email (the bottom level
module) loaded and one of the modules it used failed. I then switched down
another notch to MASI::Creator::Session and everything loaded with no errors
since there were no further down use statements. This same error was occuring
with different modules at a consistent depth level. Only occurred in handlers.
To work around the problem I've used some deep level modules like MASI::Email at
apache startup.
Possibly related to this, we were having a problem with uploading files using
Apache::Upload. It turned out that we had enough virtual servers with separate
log files to use up all of the file descriptors allowed by stdio. The error
messages in the logs were helpful (not):
:[Thu May 22 09:22:20 2003] [error] [client 207.56.32.208] [libapreq] could not
create/open temp file
More info would have been nice...
Stas Bekman wrote:
> Brian Cocks wrote:
> > I was wondering if anyone had an explanation for this...
> >
> > modperl is failing to load modules beyond a certain depth of uses.
> > Example:
> >
> > MyHandler uses Mod1 which uses Mod2 which uses.... Mod6
> >
> > Using the top level module works from the command line. After a quick
> > search of the archives I put a use statement of a deep level module in
> > our startup.pl and that fixed things.
>
> You can't 'use()' most mod_perl modules from the command line. They work only
> when mod_perl is loaded.
>
> > I'm just wondering what the source problem is and why what I did worked.
>
> Can you be more specific? Can you post a short example that reproduces the
> problem.
>
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
--
Brian Cocks
Senior Software Architect
MultiAd
bcocks@multiad.com
(309)690-5834
Re: Can't locate SomeModule.pm in @INC, even though its there...
Posted by Stas Bekman <st...@stason.org>.
Brian Cocks wrote:
> I was wondering if anyone had an explanation for this...
>
> modperl is failing to load modules beyond a certain depth of uses.
> Example:
>
> MyHandler uses Mod1 which uses Mod2 which uses.... Mod6
>
> Using the top level module works from the command line. After a quick
> search of the archives I put a use statement of a deep level module in
> our startup.pl and that fixed things.
You can't 'use()' most mod_perl modules from the command line. They work only
when mod_perl is loaded.
> I'm just wondering what the source problem is and why what I did worked.
Can you be more specific? Can you post a short example that reproduces the
problem.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com