shan_emails has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

I have installed Perl 5.8.8, Apache 2.2.25, Modperl 2.0.8 and Apache2::PageKit for this combination in Linux server, i have below error while starting the apache.
This Configuration i have changed all Apache::PageKit to Apache2::PageKit and respective source code as well. I have just copied the files ModPerl::P1 and ModPerl::P2 from Unix server to Linux. But it shows the error as above(Can't locate loadable object for module Apache::Constants in @INC).
Shall i know how to resolve this.

Thanks
Shanmugam A.

  • Comment on Can't locate loadable object for module Apache::Constants in @INC

Replies are listed 'Best First'.
Re: Can't locate loadable object for module Apache::Constants in @INC
by derby (Abbot) on Jul 15, 2013 at 17:28 UTC

    Going from apache/mod_perl 1.x to apache2/mod_perl 2.x is no small endeavor and you need to do a lot more than change a few config options. All those Apache::Reload, Apache::ErrorReports, Apache::DBI, Apache::Sig and any Apache::XXX modules your homegrown ModPerl::XX modules use will need to be changed. Take half-a-day and read the porting guide.

    -derby
      Great guide, first thing it says is to load Apache2::compat at startup and everything should work if it was done properly in mod_perl1x :)transition

      Hi All,

      Thanks for your helps, now i can able to start the apache. But while accessing the page it says 500 internal error. And the error log says that (Can't locate object method "is_main" in the perl module Apache::SIG). Shall i know how to resolve this.

Re: Can't locate loadable object for module Apache::Constants in @INC
by daxim (Curate) on Jul 15, 2013 at 17:23 UTC
Re: Can't locate loadable object for module Apache::Constants in @INC
by Clovis_Sangrail (Beadle) on Jul 17, 2013 at 21:05 UTC

    I find that "Can't Locate nnn.pm" or "Can't locate loadable object" errors result when Perl module components get installed with bad directory and/or file permissions. I got errors like this when I manually installed HTML::Parser, and they went away when I set the permissions on the installation directories (subdirectories of /<perl_installation_base>/lib/ ) to 775 or 755, and the permissions on files to 444 or 555.

    My server is behind corporate firewalls maintained by security paranoiacs, so I have to retrieve and install modules manually. Next time I will maybe try messing with umask.