Open Bug 1278234 Opened 8 years ago Updated 8 years ago

mod_perl fails to find modules on page request

Categories

(Bugzilla :: Bugzilla-General, defect)

5.1.1
Unspecified
Linux
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: theowl, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36

Steps to reproduce:

I tried to set up Bugzilla 5.1.1 using Apache with mod_perl on Linux.
After running checksetup.pl, installing all required Perl modules and configuring apache, I opened main page and got "500 Internal server error" message.

Used software versions are:
 - Perl 5.22.2
 - mod_perl 2.0.10
 - Apache 2.4.18

Apache VirtualHost config looks like this:

<VirtualHost *>
        ServerName bugs.example.com
        DocumentRoot "/var/www/bugs"
        Options +FollowSymLinks
        RewriteEngine On

        SetEnvIf X-Forwarded-Proto https HTTPS=on
        PerlPassEnv HTTPS

        PerlOptions +Parent
        PerlSwitches -w -T -I /var/www/bugs
        PerlConfigRequire /var/www/bugs/mod_perl.pl

        ErrorLog /var/log/httpd2/error_log
        LogLevel warn
</VirtualHost>



Actual results:

For each request several log messages are generated in apache error_log:

[Mon Jun 06 15:30:03.115318 2016] [perl:error] [pid 11692] [client 91.232.225.25:35868] failed to resolve handler `Bugzilla::ModPerl::ResponseHandler': Can't locate Bugzilla/ModPerl/ResponseHandler.pm in @INC (you may need to install the Bugzilla::ModPerl::ResponseHandler module) (@INC contains: /var/www/bugs/lib /var/www/bugs /usr/local/lib/perl/5.22 /usr/local/share/perl/5.22 /usr/lib/perl5 /usr/share/perl5 /etc/perl5 /usr/lib/perl5/vendor_perl /etc/httpd2) at (eval 169) line 2.
[Mon Jun 06 15:30:03.118806 2016] [perl:error] [pid 11692] [client 91.232.225.25:35868] failed to resolve handler `Bugzilla::ModPerl::CleanupHandler': Can't locate Bugzilla/ModPerl/CleanupHandler.pm in @INC (you may need to install the Bugzilla::ModPerl::CleanupHandler module) (@INC contains: /var/www/bugs/lib /var/www/bugs /usr/local/lib/perl/5.22 /usr/local/share/perl/5.22 /usr/lib/perl5 /usr/share/perl5 /etc/perl5 /usr/lib/perl5/vendor_perl /etc/httpd2) at (eval 170) line 2.
[Mon Jun 06 15:30:03.119414 2016] [perl:error] [pid 11692] [client 91.232.225.25:35868] failed to resolve handler `Bugzilla::ModPerl::CleanupHandler': Can't locate Bugzilla/ModPerl/CleanupHandler.pm in @INC (you may need to install the Bugzilla::ModPerl::CleanupHandler module) (@INC contains: /var/www/bugs/lib /var/www/bugs /usr/local/lib/perl/5.22 /usr/local/share/perl/5.22 /usr/lib/perl5 /usr/share/perl5 /etc/perl5 /usr/lib/perl5/vendor_perl /etc/httpd2) at (eval 171) line 2.

It seems that mod_perl can't find CleanupHandler and ResponseHandler modules, but they are defined in mod_perl.pl.



Expected results:

Expected result is main page loading successfully.
OS: Unspecified → Linux
Those modules are packages defined in mod_perl.pl. very strange.
I've seen Perl report that it can't locate a pm file if it actually did locate it, but it has compile errors when it tries to load it.  Which probably means it can't find some other dependency those files ask for.

Two things to check:
1) Do the files have the correct permissions for apache to see them?
2) Do you have more than one version of Perl installed on the system, and was checksetup.pl run with a different version than the one mod_perl was compiled against?
Where was mod_perl 2.0.10 released? That is not on cpan and last I checked 5.22 did not work under mod_perl. I would like to repro this issue :)
Based on http://svn.apache.org/repos/asf/perl/modperl/branches/release/ and https://svn.apache.org/repos/asf/perl/modperl/tags/, there is no 2.0.10 release yet, and 2.0.9 is known to not work with Perl 5.22. So AFAIK, this is not a Bugzilla bug but an upstream issue.
It looks like trunk has finally been fixed to support perl 5.22:

https://github.com/apache/mod_perl/commit/82827132

I will let dylan play with it. ;)
You need to log in before you can comment on or make changes to this bug.