Re: mod_perl installed via yum but not used by application (RedHat 6.5 Apache 2.2.15 mod_perl 2.0.4)

2015-01-15 Thread André Warnier

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..




Re: Have I got mod_perl installed?

2007-03-01 Thread Beginner
Lot's of replies, thanx.

On 1 Mar 2007 at 10:50, Foo JH wrote:
 To be really sure, turn on the server signature and see what your telnet 
 trick gives you.
 
 amend in your http.conf:
 ServerSignature on

ServerSignature is already on:

httpd.conf:ServerSignature On

Can we draw any conclusions from this?

 Beginner wrote:
  Hi,
 
  I am a bit confused.
 
  If I do:
  telnet localhost 80
  
 
  I get:
  HTTP/1.1 403 Forbidden
  Date: Wed, 28 Feb 2007 16:53:29 GMT
  Server: Apache/2.0.52 (Fedora)  - Note no mod_perl here
  Accept-Ranges: bytes
  Content-Length: 3931
  Connection: close
  Content-Type: text/html; charset=UTF-8
...

I have a number of handler configured like so:

Location /calendar
SetHandler perl-script
  PerlHandler MY::calendar
  Order...
/Location

These work fine and use the following pragmas;

package MY::calendar;

use Apache2::Const qw(OK DECLINED NOT_FOUND);
use APR::Table;
use Apache2::RequestUtil ();
use strict;
use Calendar::Simple;
use Date::Calc qw(Month_to_Text);
use CGI;
use Template;
use warnings;

$| = 1;

sub handler {
...

The issue with SOAP::Lite is interesting. During the install you get 
a list of transports;

...
Standalone HTTP server   [*] HTTP::Daemon   [ yes ]
Apache/mod_perl server   [ ] Apache  [ no ]
FastCGI server[ ] FCGI  [ no ]
POP3 server   [ ] MIME::Parser  [ no ]
...

I'm not sure if the formating will show it here but SOAP::Lite 
doesn't see mod_perl installed. However is does install as does 
SOAP::Apache so presumbly I can use in the same way I do with my 
other modules. 

Still I have the feeling that my installation is not standard and the 
mis-match in version is a concern.

Would any one recommend a course of action? Should I remove the 
binary RPMs that my package manager installed and install from 
source?

Thanx,
Dp.



Re: Have I got mod_perl installed?

2007-03-01 Thread Beginner
On 1 Mar 2007 at 8:40, Perrin Harkins wrote:

 On 3/1/07, Beginner [EMAIL PROTECTED] wrote:
  I have a number of handler configured like so:
 
Apache2::Const qw(OK DECLINED NOT_FOUND);
 
 I don't see how this could work if you're really running mod_perl
 1.99.  There is no module by that name in 1.99.
 
  Would any one recommend a course of action? Should I remove the
  binary RPMs that my package manager installed and install from
  source?
 
 It is a good idea to use the latest mod_perl release, and it's not
 hard to compile.  I usually suggest compiling your own rather than
 using an old one from your vendor.
 

I had started going down the road of compiling from source. More 
interesting things popped up. ExtUtils reports that mod_perl2 -- 
1.999022 is installed. mod_perl2?

There are also three mod_perls under my lib dir:

~perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/mod_perl2
~perl5/vendor_perl/5.8.5/i386-linux-thread-multi/mod_perl.pm
~perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/mod_perl

This can't be good!

When I tried to do `perl Makefile.PL MP_APXS=/path/to/apxs it 
complained:

mod_perl/1.99_16 installation detected... not ok

Cannot install mod_perl/2.0.3 on top of mod_perl/1.99_16
due to a major API change between mod_perl 1.999_21 and 1.999_22.

Conflicting file: /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-
multi/Apache2.pm
Conflicting dir: /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-
multi/Apache
...snip

I should upgrade, or rather remove both Apache and all traces of 
mod_perl and start again. My problem is that I do have a few handlers 
that work and are used a bit throughout the day. There will no doubt 
be some modify to do to these to get them up again.

Thanx,
Dp.



Re: Have I got mod_perl installed?

2007-02-28 Thread Juan Jose Natera

Hi,


If I do:
telnet localhost 80


I get:
HTTP/1.1 403 Forbidden
Date: Wed, 28 Feb 2007 16:53:29 GMT
Server: Apache/2.0.52 (Fedora)  - Note no mod_perl here


This can be configured with the Apache directive ServerTokens, so it's
not weird.

[snip]


Yet I have a number of mod_perl handlers that appear to work fine. I
have /usr/lib/httpd/modules/mod_perl.so which (presumably) get loaded
via a ~/conf.d/perl.conf.


If you have a line like the one below in your httpd.conf (or a file
Include'd by it), then you have mod_perl enabled:

LoadModule perl_module modules/mod_perl.so

If you are _certain_ your handlers are working, then it's probably
there somewhere.


Also my package manager (yum) says that mod_perl is installed as
version 1.99_16-3.  My httpd is Server version: Apache/2.0.52.

My main problem is that other modules are not seeing the mod_perl
installation, EG: SOAP::Apache.


Is that part of SOAP::Lite? if so, what version? also what error
exactly are you getting?

regards,

JJ


Re: Have I got mod_perl installed?

2007-02-28 Thread Beginner
(sorry not sure if this is top or bottom post list)

My thought was that my apache is: Server version: Apache/2.0.52 and 
my mod_perl is (according to yum):

mod_perl.i3861.99_16-3  installed

From what I've read this shouldn't work.

On 28 Feb 2007 at 9:51, Juan Jose Natera wrote:
 
 LoadModule perl_module modules/mod_perl.so

Yes perl.conf has this line.
 

 Is that part of SOAP::Lite? if so, what version? also what error
 exactly are you getting?

I was trying `perl -MCPAN -e 'install SOAP::Apache'.

There were test failures:

t/06-modules...NOK 15# Failed test 15 in t/06-modules.t at 
line 24 fail #14
#  t/06-modules.t line 24 is:   $@ =~ /(Can\'t 
locate)|(XML::Parser::Lite requires)|(this is only version)|(load 
mod_perl)/

the load mod_perl is what concerns me and during the install it said 
that mod_perl wan't installed.

I am tempted to install from source but I am nervous about crippling 
my installation as it's a live system.

Thanx,
Dp.
 






Re: Have I got mod_perl installed?

2007-02-28 Thread Juan Jose Natera

I was trying `perl -MCPAN -e 'install SOAP::Apache'.


That actually tries to install SOAP::Lite


t/06-modules...NOK 15# Failed test 15 in t/06-modules.t at
line 24 fail #14
#  t/06-modules.t line 24 is:   $@ =~ /(Can\'t
locate)|(XML::Parser::Lite requires)|(this is only version)|(load
mod_perl)/


It seems SOAP::Lite once installed knows how to handle the different
versions of mod_perl (including 1.99_X).

However, when you attempt to install SOAP::Lite if you tell it you
want an Apache/ModPerl SOAP server, it tries to install mod_perl 1.2X,
so my suggestion would be to tell it you _don't_ want Apache/mod_perl
support, it will install the transport modules anyway.



the load mod_perl is what concerns me and during the install it said
that mod_perl wasn't installed.

I am tempted to install from source but I am nervous about crippling
my installation as it's a live system.


Tell CPAN where you want your modules installed:

# perl -MCPAN -e shell
cpan o conf makepl_arg PREFIX=/usr/local/whatever
cpan o conf commit

Then you can adjust @INC via your preferred method.

Still, I would recommend testing it in another machine and asking at
the SOAP::Lite users mailing list, since that's where the problem
seems to be.

Juan


Re: Have I got mod_perl installed?

2007-02-28 Thread Foo JH
To be really sure, turn on the server signature and see what your telnet 
trick gives you.


amend in your http.conf:
ServerSignature on

Beginner wrote:

Hi,

I am a bit confused.

If I do:
telnet localhost 80


I get:
HTTP/1.1 403 Forbidden
Date: Wed, 28 Feb 2007 16:53:29 GMT
Server: Apache/2.0.52 (Fedora)  - Note no mod_perl here
Accept-Ranges: bytes
Content-Length: 3931
Connection: close
Content-Type: text/html; charset=UTF-8


Yet I have a number of mod_perl handlers that appear to work fine. I 
have /usr/lib/httpd/modules/mod_perl.so which (presumably) get loaded 
via a ~/conf.d/perl.conf.


Also my package manager (yum) says that mod_perl is installed as 
version 1.99_16-3.  My httpd is Server version: Apache/2.0.52.


My main problem is that other modules are not seeing the mod_perl 
installation, EG: SOAP::Apache.


Is my configuration messed up? Do I need to start again?
TIA,
Dp.

  




Re: Is mod_perl installed

2005-05-21 Thread Jay Scherrer
Cfaust,

What does your httpd.conf file say after the modules listing?
If it says something like:
#
#load configfiles from the config directory /etc/httpd.conf.d
#
Include conf.d/*.conf
#
Then check there for your: perl.conf file.
Within the perl.conf file you will find:
LoadModule perl_module modules/mod_perl.so

Then look for the perl_module in /etc/httpd/modules.

This is standard placement for Redhat Linux RPMs.
I have found that I can edit this perl.conf to customize my modPerl and
directories and script aliases 

On Thu, 2005-05-19 at 14:49 -0400, cfaust-dougot wrote:
 Hey Stas,
  
 I know this has been asked a ton of time and I have read everything on
 the site to check if MP is installed - my problem now is I have a
 client who has told me over and over again that mod_perl is installed
 - every method documented on the site says it is not (string doesn't
 appear in the error log, via telnet to apache or via the lwp-request
 method, it also doesn't appear via httpd -l.
 All method above report only Apache/2.0.46 (Red Hat) configured
  
 The box is RH enterprise and Apache and MP2 were installed via RPM -
 the client called RH (to prove me wrong) and RH told him if you
 installed MP2 via the RH RPM then that MP2 line shouldn't appear
 anyplace...
  
 I find that really hard to believe BEFORE I wasn't able find anything
 documented about it.. Is that true?
  
 So I guess my question is, can it be said with 100% certainty that the
 mod_perl 1.99 should show up in the error log (or those other
 documented methods) if its installed and configured properly?
  
 Is there any other ways to prove its installed or not installed?
  
 Thanks
 -Chris



RE: Is mod_perl installed

2005-05-20 Thread cfaust-dougot
Title: Re: Is mod_perl installed






Thanks Perrin, that makes 
more sense.
Although I agree the RPM is ancient, I've 
been telling them that the real problem is they installed from RPM and now think 
nothing could possibly be wrong as the RPM installed without an error 
:)..

-Chris





From: Perrin Harkins 
[mailto:[EMAIL PROTECTED]Sent: Thu 5/19/2005 5:06 
PMTo: modperl@perl.apache.orgSubject: Re: Is mod_perl 
installed

On Thursday 19 May 2005 2:49 pm, cfaust-dougot wrote: 
The box is RH enterprise and Apache and MP2 were installed via RPMWell, 
you know that's going to be a problem, right? That RPM is ancient 
andthat version of mod_perl is no longer supported. So I guess 
my question is, can it be said with 100% certainty that the "mod_perl 
1.99" should show up in the error log (or those other documented 
methods) if its installed and configured properly?It's always possible 
to change things in the source, but it seems veryunlikely they would have 
done this for the error log message. More likely itis installed but 
not configured to actually be loaded when the server startsup.- 
Perrin




Re: Is mod_perl installed

2005-05-20 Thread Philip M. Golllucci
cfaust-dougot wrote:
Hey Stas,
 
I know this has been asked a ton of time and I have read everything on 
the site to check if MP is installed - my problem now is I have a client 
who has told me over and over again that mod_perl is installed - every 
method documented on the site says it is not (string doesn't appear in 
the error log, via telnet to apache or via the lwp-request method, it 
also doesn't appear via httpd -l.
All method above report only Apache/2.0.46 (Red Hat) configured
 
The box is RH enterprise and Apache and MP2 were installed via RPM - the 
client called RH (to prove me wrong) and RH told him if you installed 
MP2 via the RH RPM then that MP2 line shouldn't appear anyplace...
 
I find that really hard to believe BEFORE I wasn't able find anything 
documented about it.. Is that true?
 
So I guess my question is, can it be said with 100% certainty that the 
mod_perl 1.99 should show up in the error log (or those other 
documented methods) if its installed and configured properly?
 
Is there any other ways to prove its installed or not installed?
Is the
LoadModule perl_module modules/mod_perl.so
line in the config ?
Try looking at /server-status and /server-info if they are configured
on.

Thanks
-Chris

--
END
---
  What doesn't kill us can only make us stronger.
Philip M. Gollucci [EMAIL PROTECTED] 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer - Liquidity Services Inc.
http://liquidityservicesinc.com


Is mod_perl installed

2005-05-19 Thread cfaust-dougot
Hey Stas,

I know this has been asked a ton of time and I have 
read everything on the site to check if MP is installed - my problem now is I 
have a client who has told me over and over again that mod_perl is installed - 
every method documented on the site says it is not (string doesn't appear in the 
error log, via telnet to apache or via the lwp-request method, it also doesn't 
appear via httpd -l.
All method above report only "Apache/2.0.46 (Red 
Hat) configured"

The box is RH enterprise and Apache and MP2 were 
installed via RPM - the client called RH (to prove me wrong)and RH told 
him if you installed MP2 via the RH RPM then that MP2 line shouldn't appear 
anyplace...

I find that really hard to believe BEFORE I wasn't 
able find anything documented about it.. Is that true?

So I guess my question is, can it be said with 100% 
certainty that the "mod_perl 1.99" should show up in the error log (or those 
other documented methods) if its installed and configured properly?

Is there any other ways to prove its installed or 
not installed?

Thanks
-Chris

RE: Is mod_perl installed

2005-05-19 Thread cfaust-dougot
Title: Re: Is mod_perl installed






Hey Jay,

Yes, all that is true.. the perl.conf is 
pulled into the httpd.conf and the first line is loading the mod_perl.so and the 
file does exist in the modules directory..

So by that your saying that mp2 is OK even 
though it doesn't appear any of those methods to check if its installed or not? 
I wouldn't think the existence of the conf and so file would be enough to say 
everything was correct.

Thanks
-Chris


From: Jay Scherrer 
[mailto:[EMAIL PROTECTED]Sent: Thu 5/19/2005 5:17 PMTo: 
cfaust-dougotCc: mod_perlSubject: Re: Is mod_perl 
installed

Cfaust,What does your httpd.conf file say after the 
modules listing?If it says something like:##load configfiles from 
the config directory "/etc/httpd.conf.d"#Include 
conf.d/*.conf#Then check there for your: perl.conf file.Within the 
perl.conf file you will find:LoadModule perl_module 
modules/mod_perl.soThen look for the perl_module in 
/etc/httpd/modules.This is standard placement for Redhat Linux 
RPMs.I have found that I can edit this perl.conf to customize my modPerl 
anddirectories and script aliasesOn Thu, 2005-05-19 at 14:49 -0400, 
cfaust-dougot wrote: Hey Stas, I know this has 
been asked a ton of time and I have read everything on the site to check 
if MP is installed - my problem now is I have a client who has told me 
over and over again that mod_perl is installed - every method documented 
on the site says it is not (string doesn't appear in the error log, via 
telnet to apache or via the lwp-request method, it also doesn't appear 
via httpd -l. All method above report only "Apache/2.0.46 (Red Hat) 
configured" The box is RH enterprise and Apache and MP2 
were installed via RPM - the client called RH (to prove me wrong) and RH 
told him if you installed MP2 via the RH RPM then that MP2 line 
shouldn't appear anyplace... I find that really 
hard to believe BEFORE I wasn't able find anything documented about it.. 
Is that true? So I guess my question is, can it be said 
with 100% certainty that the "mod_perl 1.99" should show up in the 
error log (or those other documented methods) if its installed and 
configured properly? Is there any other ways to prove its 
installed or not installed? Thanks 
-Chris




Re: Is mod_perl installed

2005-05-19 Thread Stas Bekman
cfaust-dougot wrote:
Hey Jay,
 
Yes, all that is true.. the perl.conf is pulled into the httpd.conf and
the first line is loading the mod_perl.so and the file does exist in the
modules directory..

So by that your saying that mp2 is OK even though it doesn't appear any
of those methods to check if its installed or not? I wouldn't think the
existence of the conf and so file would be enough to say everything was
correct.
If it quacks like a duck. if it walks like a duck. it must be a duck.
If you don't see that mod_perl is running, that means that it doesn't.
It might be installed, but if it's not enabled then it's not running.
The easy way to check whether the .conf file is actually loaded is to add 
some garbage in it. if it's loaded httpd will fail to start.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: Is mod_perl installed

2005-05-19 Thread cfaust-dougot
Title: Re: Is mod_perl installed






Thanks Stas, as always - you 
da man!!!

-Chris


From: Stas Bekman 
[mailto:[EMAIL PROTECTED]Sent: Thu 5/19/2005 7:18 PMTo: 
cfaust-dougotCc: [EMAIL PROTECTED]; mod_perlSubject: Re: Is 
mod_perl installed

cfaust-dougot wrote: Hey Jay, Yes, 
all that is true.. the perl.conf is pulled into the httpd.conf and the 
first line is loading the mod_perl.so and the file does exist in the 
modules directory.. So by that your saying that mp2 is OK even 
though it doesn't appear any of those methods to check if its installed 
or not? I wouldn't think the existence of the conf and so file would be 
enough to say everything was correct.If it quacks like a duck. 
if it walks like a duck. it must be a duck.If you don't see that 
mod_perl is running, that means that it doesn't.It might be installed, 
but if it's not enabled then it's not running.The easy way to check 
whether the .conf file is actually loaded is to addsome garbage in it. if 
it's loaded httpd will fail to 
start.--__Stas 
Bekman JAm_pH 
-- Just Another mod_perl Hackerhttp://stason.org/ 
mod_perl Guide --- http://perl.apache.orgmailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.comhttp://modperlbook.org http://apache.org http://ticketmaster.com