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

List:       apache-modperl
Subject:    Re: mod_perl installed via yum but not used by application (RedHat 6.5 Apache 2.2.15 mod_perl 2.0.4)
From:       André_Warnier <aw () ice-sa ! com>
Date:       2015-01-15 11:20:38
Message-ID: 54B7A286.90200 () ice-sa ! com
[Download RAW message or body]

BOUX Frederik wrote:
> Hello,
> 
> I am using OTRS on a RedHat 6.5 with apache2 and mod_perl2. We are using these \
> packages (yum info feedback): 
> Installed Packages
> Name        : httpd
> Arch        : x86_64
> Version     : 2.2.15
> Release     : 39.el6
> 
> Name        : mod_perl
> Arch        : x86_64
> Version     : 2.0.4
> Release     : 11.el6_5
> 
> We noticed a performance difference with the Development server. I can see in htop \
> that the apache user is spawning /usr/bin/perl processes to run all the perl \
> scripts instead of handling them in an httpd process. So I placed the following \
> script in the same directory as my index.pl to see if mod_perl was being used: 
> #!/usr/bin/perl
> print "Content-type: text/plain\n\n";
> print "Server's environment\n";
> foreach ( keys %ENV ) {
> print "$_\t$ENV{$_}\n";
> }
> 
> Dev shows these two variables that are completely missing on Sandbox:
> 
> MOD_PERL_API_VERSION 2
> MOD_PERL mod_perl/2.0.4
> 
> So I'm pretty sure mod_perl isn't being used . But as far as I can tell everything \
> is configured: 
> 1) /etc/httpd/conf.d/perl.conf contains the line: LoadModule perl_module \
> modules/mod_perl.so 
> 2) /etc/httpd/conf/httpd.conf contains an Include: Include conf.d/*.conf
> 
> 3) this is the default .conf from OTRS but I can't find a mistake:
> 
> # Setup environment and preload modules
> Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
> 
> # Reload Perl modules when changed on disk
> PerlModule Apache2::Reload
> PerlInitHandler Apache2::Reload
> 
> # general mod_perl2 options
> <Location /otrs>
> #        ErrorDocument 403 /otrs/customer.pl
> ErrorDocument 403 /otrs/index.pl
> SetHandler  perl-script
> PerlResponseHandler ModPerl::Registry
> Options +ExecCGI
> PerlOptions +ParseHeaders
> PerlOptions +SetupEnv
> 
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Order allow,deny
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> Order allow,deny
> Allow from all
> </IfModule>
> </Location>
> 
> # mod_perl2 options for GenericInterface
> <Location /otrs/nph-genericinterface.pl>
> PerlOptions -ParseHeaders
> </Location>
> 
> </IfModule>
> 
> 
> 
> And yet the module is loaded:
> 
> [user@server httpd]$ httpd -M | grep perl
> Syntax OK
> perl_module (shared)
> [user@server httpd]$ httpd -l
> Compiled in modules:
> core.c
> prefork.c
> http_core.c
> mod_so.c
> 
> 
> Anyone who can spot a mistake or who has additional steps to troubleshoot why \
> mod_perl isn't being used? 

Just a little comment : when you restart your server, the first line in the error log \
 should clearly show if mod_perl is included or not.

Also, if it isn't, then all the mod_perl specific configuration lines above should \
trigger  an Apache error when it starts (and it would not start).
Errors such as
"PerlOptions" : unknown directive at line xxx ...

Unless your server actually starts with another configuration file set than the one \
you  think..


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

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