Re: mod_perl error: Can't locate object method "boot"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gunnar Hjalmarsson wrote:
running a simple "Hello World" script resulted in "Internal Server
Error" and this complaint in the error log:

failed to resolve handler `ModPerl::Registry'
Can't locate object method "boot" via package "mod_perl" at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/Log.pm
line 6.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi/ModPerl/RegistryCooker.pm
line 21.

I have made some progress. This is the content of @INC if you run a Perl program as a plain CGI script:

  /usr/lib/perl5/5.8.1/i386-linux-thread-multi
  /usr/lib/perl5/5.8.1
  /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
  /usr/lib/perl5/site_perl/5.8.1
  /usr/lib/perl5/site_perl
  /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.8.1
  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.8.0
  /usr/lib/perl5/vendor_perl
  /usr/lib/perl5/5.8.1/i386-linux-thread-multi
  /usr/lib/perl5/5.8.1

There are Apache/Log.pm files (not identical) both in
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi and in
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi. The file
that should be loaded is the one at the latter location. I have no
idea why things have been set up that way, but that's how it is.

What I did was loading a startup.pl file when starting the server with
the following line:

use lib '/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi';

By doing so, that directory was made the first directory in @INC when
running a program under mod_perl, and the correct version of
Apache/Log.pm got loaded.

To me, this appears to be a decent solution. However, I feel that I'm
out on deep water here, and if somebody is able to share some insight,
it would be greatly appreciated.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux