Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 96736 invoked from network); 14 Dec 2010 18:08:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Dec 2010 18:08:53 -0000 Received: (qmail 12129 invoked by uid 500); 14 Dec 2010 18:08:53 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 12086 invoked by uid 500); 14 Dec 2010 18:08:52 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 12079 invoked by uid 99); 14 Dec 2010 18:08:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Dec 2010 18:08:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.82.177] (HELO mail-wy0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Dec 2010 18:08:48 +0000 Received: by wyf22 with SMTP id 22so755467wyf.22 for ; Tue, 14 Dec 2010 10:08:26 -0800 (PST) Received: by 10.216.18.195 with SMTP id l45mr4960166wel.79.1292350106286; Tue, 14 Dec 2010 10:08:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.245.197 with HTTP; Tue, 14 Dec 2010 10:08:06 -0800 (PST) In-Reply-To: References: <4D06B240.8040209@press.uchicago.edu> From: Michael Stevens Date: Tue, 14 Dec 2010 18:08:06 +0000 Message-ID: Subject: Re: Nonexistent URLs give server error To: richter@ecos.de Cc: Robby Desmond , embperl@perl.apache.org Content-Type: multipart/alternative; boundary=0014853bbd7802bd1b049762b510 --0014853bbd7802bd1b049762b510 Content-Type: text/plain; charset=ISO-8859-1 We set it up like this in httpd.conf: LoadModule embperl_module /opt/dianomi/perl/lib/site_perl/5.8.9/x86_64-linux/auto/Embperl/Embperl.so Embperl_Options 262144 PerlModule Embperl On 14 December 2010 14:51, wrote: > Hi Michael, > > > > It should return a 404 and not a 500. > > > > What are your exact setting for EMBPERL_OPTIONS ? > > > > gerald > > > > > > *From:* Michael Stevens [mailto:michael.stevens@dianomi.com] > *Sent:* Tuesday, December 14, 2010 1:33 PM > *To:* Robby Desmond > *Cc:* embperl@perl.apache.org > *Subject:* Re: Nonexistent URLs give server error > > > > Robby, > > > > Thanks, but we've actually got that set already, so I don't think it's the > problem. > > On 13 December 2010 23:54, Robby Desmond > wrote: > > Hi Michael, > > http://perl.apache.org/embperl/pod/doc/Embperl.-page-13-.htm > > You'll notice this: > "Sometimes you want to have a different behaviour. One possibility is to > let Apache display a custom error page (of course only when you run > under mod_perl). > > To get this working you need to set the option optReturnError (262144) > in your httpd.conf in the EMBPERL_OPTIONS directive. > > With this option set, Embperl sends no output in case of an error. It > returns the error back to Apache or the calling program. When running > under mod_perl this gives you the chance to use the Apache ErrorDocument > directive to show a custom error-document." > > The non-existent URL is still calling the Embperl handler, presumably > because Embperl is supposed to take control of that URI-space, or the > request was for an .epl file (that didn't actually exist), so you should > still be able to pass the error back up to Apache, and have mod_perl do > something useful with it. > > -R > > > > On 12/13/2010 5:39 AM, Michael Stevens wrote: > > Hi. > > > > We're using embperl with mod_perl to handle files ending in .epl. This > > is mostly good, except it seems to result in a 500 error being logged > > whenever someone attempts to access a nonexistent .epl file. Is there > > any way to configure embperl to give a more expected 404 error? > > > > -- > > Michael Stevens > > Dianomi Ltd > > 18 Buckingham Gate > > London SW1E 6LB > > > > Tel: 020 7802 5530 > > Fax: 020 7630 7356 > > > www.dianomi.com > > > > > The information in this message and any attachment is intended for the > > addressee and is confidential and may be subject to legal privilege. > > Dianomi Ltd, Registered Office: One America Square, Crosswall, London. > > EC3N 2SG. Registered in England and Wales with Company Registration > > Number 4513809. VAT registration number: 809754988 > > -- > Robby Desmond > BiblioVault Operations Assistant > University of Chicago Press > http://www.bibliovault.org/ > ph: 773-834-2387 > cell: 773-458-0959 > rdesmond@press.uchicago.edu > > > > > -- > Michael Stevens > Dianomi Ltd > 18 Buckingham Gate > London SW1E 6LB > > Tel: 020 7802 5530 > Fax: 020 7630 7356 > www.dianomi.com > > The information in this message and any attachment is intended for the > addressee and is confidential and may be subject to legal privilege. Dianomi > Ltd, Registered Office: One America Square, Crosswall, London. EC3N 2SG. > Registered in England and Wales with Company Registration Number 4513809. > VAT registration number: 809754988 > -- Michael Stevens Dianomi Ltd 18 Buckingham Gate London SW1E 6LB Tel: 020 7802 5530 Fax: 020 7630 7356 www.dianomi.com The information in this message and any attachment is intended for the addressee and is confidential and may be subject to legal privilege. Dianomi Ltd, Registered Office: One America Square, Crosswall, London. EC3N 2SG. Registered in England and Wales with Company Registration Number 4513809. VAT registration number: 809754988 --0014853bbd7802bd1b049762b510 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable We set it up like this in httpd.conf:

LoadModule em= bperl_module /opt/dianomi/perl/lib/site_perl/5.8.9/x86_64-linux/auto/Embper= l/Embperl.so
Embperl_Options 262144
PerlModule Embperl<= /div>


On 14 December 2010 14:51, <= span dir=3D"ltr"><richter@ecos.de= > wrote:

Hi Michael,

=A0=

It should ret= urn a 404 and not a 500.

=A0

What a= re your exact setting for EMBPERL_OPTIONS ?

=A0

gerald

=A0

=A0

From:= Michael Stevens [mailto:michael.stevens@dianomi.com= ]
Sent: Tuesday, December 14, 2010 1:33 PM
To: Robby Desmond=
Cc: embperl@perl.apache.org
Subject: Re: Nonexistent URLs give s= erver error

=A0

Robby,

=A0

=

Thanks, but we&#= 39;ve actually got that set already, so I don't think it's the prob= lem.

On 13 December 2010 23:54, Robby Desmond <rdesmond@pre= ss.uchicago.edu> wrote:

Hi Michael,
http://perl.apache.org/embperl/pod/doc/Embperl.-page-13-.h= tm

You'll notice this:
"Sometimes you want to have a different= behaviour. One possibility is to
let Apache display a custom error page= (of course only when you run
under mod_perl).

To get this workin= g you need to set the option optReturnError (262144)
in your httpd.conf in the EMBPERL_OPTIONS directive.

With this optio= n set, Embperl sends no output in case of an error. It
returns the error= back to Apache or the calling program. When running
under mod_perl this= gives you the chance to use the Apache ErrorDocument
directive to show a custom error-document."

The non-existent UR= L is still calling the Embperl handler, presumably
because Embperl is su= pposed to take control of that URI-space, or the
request was for an .epl= file (that didn't actually exist), so you should
still be able to pass the error back up to Apache, and have mod_perl do
= something useful with it.

-R



= On 12/13/2010 5:39 AM, Michael Stevens wrote:
> Hi.
>
> W= e're using embperl with mod_perl to handle files ending in .epl. This > is mostly good, except it seems to result in a 500 error being logged<= br>> whenever someone attempts to access a nonexistent .epl file. Is the= re
> any way to configure embperl to give a more expected 404 error?<= br> >
> --
> Michael Stevens
> Dianomi Ltd
> 18 Buck= ingham Gate
> London SW1E 6LB
>
> Tel: 020 7802 5530
&= gt; Fax: 020 7630 7356

> www.dianomi.com <http://www.dianomi.com>

>
>= ; The information in this message and any attachment is intended for the> addressee and is confidential and may be subject to legal privilege.<= br> > Dianomi Ltd, Registered Office: One America Square, Crosswall, London.=
> EC3N 2SG. Registered in England and Wales with Company Registratio= n
> Number 4513809. VAT registration number: 809754988

--
Robby DesmondBiblioVault Operations Assistant
University of Chicago Press
http://www.bibliovault.o= rg/
ph: 773-834-2387
cell: 773-458-0959
rdesmond@press.uchicago.edu

<= /div>




--
Michael Steven= s
Dianomi Ltd
18 Buckingham Gate
London SW1E 6LB

Tel: 020 7802 5= 530
Fax: 020 7630 7356
www.dianomi.com

The information in this message and any a= ttachment is intended for the addressee and is confidential and may be subj= ect to legal privilege. Dianomi Ltd, Registered Office: One America Square,= Crosswall, London. EC3N 2SG. Registered in England and Wales with Company = Registration Number 4513809. VAT registration number: 809754988




--
Michael Stevens
Dianomi Ltd
18 Buckingham Gate
London= SW1E 6LB

Tel: 020 7802 5530
Fax: 020 7630 7356
www.dianomi.com

The information in this message and any attachment is intended for the = addressee and is confidential and may be subject to legal privilege. Dianom= i Ltd, Registered Office: One America Square, Crosswall, London. EC3N 2SG. = Registered in England and Wales with Company Registration Number 4513809. V= AT registration number: 809754988
--0014853bbd7802bd1b049762b510--