SetHandler perl-script not working

Hi all,
I have a serious problem with sethandler perl-script not working.
For testing I have enabled perl-status:

<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache2::Status
Order deny,allow
Allow from all
</Location>

=2E..but I'm still getting 404 for the URL. I'm definitely reading the
file as adding a syntax error in the above causes httpd -t to fail. It
is quite a complex install though with Drupal and Scalix (which uses
tomcat and ajp proxy). Can anyone suggest how to go about fixing this?

Thanks

Don't worry about the allow from all, it's a private box and I'll remove
it again.
Kevin Thorpe [ Di, 12 Januar 2010 12:43 ] [ ID #2028534 ]

Re: SetHandler perl-script not working

Can you post the error message(s)? Theres nothing obviously wrong with
what you've got there.

Adam

Kevin Thorpe wrote:
> Hi all,
> I have a serious problem with sethandler perl-script not working.
> For testing I have enabled perl-status:
>
> <Location /perl-status>
> SetHandler perl-script
> PerlResponseHandler Apache2::Status
> Order deny,allow
> Allow from all
> </Location>
>
> ...but I'm still getting 404 for the URL. I'm definitely reading the
> file as adding a syntax error in the above causes httpd -t to fail. It
> is quite a complex install though with Drupal and Scalix (which uses
> tomcat and ajp proxy). Can anyone suggest how to go about fixing this?
>
> Thanks
>
> Don't worry about the allow from all, it's a private box and I'll remove
> it again.
Adam Prime [ Di, 12 Januar 2010 15:08 ] [ ID #2028537 ]

Re: SetHandler perl-script not working

On Tue, Jan 12, 2010 at 6:43 AM, Kevin Thorpe
<Kevin.Thorpe [at] pibenchmark.com> wrote:
> <Location /perl-status>
> =A0 =A0SetHandler perl-script
> =A0 =A0PerlResponseHandler Apache2::Status
> =A0 =A0Order deny,allow
> =A0 =A0Allow from all
> </Location>
>
> ...but I'm still getting 404 for the URL.

It sounds like something else in your config is intercepting the URL.
Try removing other things one chunk at a time until this works.

Alternatively, you might be sending your requests to the wrong server
or virtual server.

- Perrin
Perrin Harkins [ Di, 12 Januar 2010 15:12 ] [ ID #2028538 ]

RE: SetHandler perl-script not working

I tried stripping everything out as suggested and ended up with only the
basic httpd.conf and perl.conf installed, still no joy. Why is it
looking for index.php when I'm assking for a perl script? Config in
pastebin.

thanks

=3D=3D> /var/log/httpd/access_log <=3D=3D
10.20.11.148 - - [13/Jan/2010:12:26:21 +0000] "GET /perl-status
HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US;
rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)"

=3D=3D> /var/log/httpd/error_log <=3D=3D
[Wed Jan 13 12:26:21 2010] [error] [client 10.20.11.148] File does not
exist: /home/httpd/html/index.php
[Wed Jan 13 12:26:21 2010] [error] [client 10.20.11.148] File does not
exist: /home/httpd/html/index.php

http://pastebin.com/m56f4bd2b

> -----Original Message-----
> From: Perrin Harkins [mailto:pharkins [at] gmail.com]
> Sent: 12 January 2010 14:13
> To: Kevin Thorpe
> Cc: modperl [at] perl.apache.org
> Subject: Re: SetHandler perl-script not working
>
> On Tue, Jan 12, 2010 at 6:43 AM, Kevin Thorpe
> <Kevin.Thorpe [at] pibenchmark.com> wrote:
> > <Location /perl-status>
> > =A0 =A0SetHandler perl-script
> > =A0 =A0PerlResponseHandler Apache2::Status
> > =A0 =A0Order deny,allow
> > =A0 =A0Allow from all
> > </Location>
> >
> > ...but I'm still getting 404 for the URL.
>
> It sounds like something else in your config is intercepting the URL.
> Try removing other things one chunk at a time until this works.
>
> Alternatively, you might be sending your requests to the wrong server
> or virtual server.
>
> - Perrin
Kevin Thorpe [ Mi, 13 Januar 2010 13:28 ] [ ID #2028671 ]

Re: SetHandler perl-script not working

On Wed, 13 Jan 2010 13:28:03 +0100, Kevin Thorpe
<Kevin.Thorpe [at] pibenchmark.com> wrote:

> I tried stripping everything out as suggested and ended up with only the
> basic httpd.conf and perl.conf installed, still no joy. Why is it
> looking for index.php when I'm assking for a perl script? Config in
> pastebin.

You happen to have a redirect rule at line 101 that looks like:

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

are you sure that is correct?

--
Cosimo
Cosimo Streppone [ Mi, 13 Januar 2010 13:30 ] [ ID #2028674 ]

RE: SetHandler perl-script not working

Sorry, forgot to strip out. Was commented out for test and I had to put
it back to get my site working. RewriteEngine wasn't on anyway and I was
watching rewritelog (level 9) as well as access_log and error_log so no
rewrite there

> -----Original Message-----
> From: Cosimo Streppone [mailto:cosimo [at] streppone.it]
> Sent: 13 January 2010 12:31
> To: Kevin Thorpe
> Cc: Mod_perl users
> Subject: Re: SetHandler perl-script not working
>
> On Wed, 13 Jan 2010 13:28:03 +0100, Kevin Thorpe
> <Kevin.Thorpe [at] pibenchmark.com> wrote:
>
> > I tried stripping everything out as suggested and ended up with only
> the
> > basic httpd.conf and perl.conf installed, still no joy. Why is it
> > looking for index.php when I'm assking for a perl script? Config in
> > pastebin.
>
> You happen to have a redirect rule at line 101 that looks like:
>
> RewriteRule ^(.*)$ index.php?q=3D$1 [L,QSA]
>
> are you sure that is correct?
>
> --
> Cosimo
Kevin Thorpe [ Mi, 13 Januar 2010 13:35 ] [ ID #2028675 ]

Re: SetHandler perl-script not working

On Wed, Jan 13, 2010 at 7:28 AM, Kevin Thorpe
<Kevin.Thorpe [at] pibenchmark.com> wrote:
> I tried stripping everything out as suggested and ended up with only the
> basic httpd.conf and perl.conf installed, still no joy.

There's still a ton of stuff in there. You need to take all of the
Files, Location, and Directory stuff out to find the culprit.

My wild guess is that if you move this block to the bottom, it will work.

- Perrin
Perrin Harkins [ Mi, 13 Januar 2010 18:02 ] [ ID #2028676 ]

Re: SetHandler perl-script not working

--00504502cc73e56094047d0ed682
Content-Type: text/plain; charset=ISO-8859-1

Is that rewrite rule (~line 101) turning everything into an index.php?

Sent from my gPhone

On Jan 13, 2010 11:02 AM, "Perrin Harkins" <pharkins [at] gmail.com> wrote:

On Wed, Jan 13, 2010 at 7:28 AM, Kevin Thorpe

<Kevin.Thorpe [at] pibenchmark.com> wrote:

> I tried stripping everything out as suggested and ended up with only the >
basic httpd.conf and pe...
There's still a ton of stuff in there. You need to take all of the
Files, Location, and Directory stuff out to find the culprit.

My wild guess is that if you move this block to the bottom, it will work.

- Perrin

--00504502cc73e56094047d0ed682
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Is that rewrite rule (~line 101) turning everything into an index.php?</=
p>
<p>Sent from my gPhone</p>
<p><blockquote type=3D"cite">On Jan 13, 2010 11:02 AM, "Perrin Harkins=
" <<a href=3D"mailto:pharkins [at] gmail.com">pharkins [at] gmail.com</a>>=
wrote:<br><br>On Wed, Jan 13, 2010 at 7:28 AM, Kevin Thorpe<br>
<p><font color=3D"#500050"><<a href=3D"mailto:Kevin.Thorpe [at] pibenchmark.c=
om">Kevin.Thorpe [at] pibenchmark.com</a>> wrote:
</font></p><p><font color=3D"#500050">> I tried stripping everything out=
as suggested and ended up with only the
> basic httpd.conf and pe...</font></p>There's still a ton of stuff =
in there. =A0You need to take all of the<br>
Files, Location, and Directory stuff out to find the culprit.<br>
<br>
My wild guess is that if you move this block to the bottom, it will work.<b=
r>
<font color=3D"#888888"><br>
- Perrin<br>
</font></blockquote></p>

--00504502cc73e56094047d0ed682--
Doug Sims [ Mi, 13 Januar 2010 18:09 ] [ ID #2028678 ]

RE: SetHandler perl-script not working

Sorry, I had taken that out to test but forgot to strip from the
pastebin. That's there for
Drupal which is just a huge clever 404 script.

From: Douglas Sims [mailto:ratsbane [at] gmail.com]
Sent: 13 January 2010 17:10
Cc: modperl [at] perl.apache.org; Kevin Thorpe
Subject: Re: SetHandler perl-script not working

Is that rewrite rule (~line 101) turning everything into an index.php?
Sent from my gPhone
On Jan 13, 2010 11:02 AM, "Perrin Harkins" <pharkins [at] gmail.com> wrote:

On Wed, Jan 13, 2010 at 7:28 AM, Kevin Thorpe
<Kevin.Thorpe [at] pibenchmark.com> wrote:
> I tried stripping everything out as suggested and ended up with only
the > basic httpd.conf and pe...
There's still a ton of stuff in there. =A0You need to take all of the
Files, Location, and Directory stuff out to find the culprit.

My wild guess is that if you move this block to the bottom, it will
work.

- Perrin
Kevin Thorpe [ Mi, 13 Januar 2010 18:14 ] [ ID #2028679 ]
Webserver » gmane.comp.apache.mod-perl » SetHandler perl-script not working

Vorheriges Thema: intermittent segfaults, ssl?
Nächstes Thema: Zip on the fly problem