Mailing List Archive

Nonexistent URLs give server error
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
Re: Nonexistent URLs give server error [ In reply to ]
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 <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.
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Nonexistent URLs give server error [ In reply to ]
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 <rdesmond@press.uchicago.edu>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 <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.
> > 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
RE: Nonexistent URLs give server error [ In reply to ]
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 <rdesmond@press.uchicago.edu> 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 <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.
> 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
Re: Nonexistent URLs give server error [ In reply to ]
This sounds very much like an issue we had many years ago when we were
just getting started with EmbPerl 1.3.x. It turned out to be due to a
custom handler we'd written, to merge server-side includes with EmbPerl.
That code wasn't distinguishing its failures - it was simply returning a
BAD_REQUEST error if HTML::EmbPerl::Execute returned any error.

Initially, we fixed our code to be more intelligent, but later eliminated
that handler entirely, as we became more comfortable with using Execute
for our includes.

--
Ed Grimm
Identity Services



From:
Michael Stevens <michael.stevens@dianomi.com>
To:
Robby Desmond <rdesmond@press.uchicago.edu>
Cc:
"embperl@perl.apache.org" <embperl@perl.apache.org>
Date:
12/14/2010 07:34 AM
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 <rdesmond@press.uchicago.edu>
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 <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.
> 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
Re: Nonexistent URLs give server error [ In reply to ]
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, <richter@ecos.de> 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 <rdesmond@press.uchicago.edu>
> 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 <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.
> > 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
RE: Nonexistent URLs give server error [ In reply to ]
Hi,

 

this looks ok.

 

What ist he exact error message you got in the httpd error log, when someone requests a non exitent epl file?

 

Gerald

 

 

From: Michael Stevens [mailto:michael.stevens@dianomi.com]
Sent: Tuesday, December 14, 2010 7:08 PM
To: Gerald Richter - ECOS
Cc: Robby Desmond; embperl@perl.apache.org
Subject: Re: Nonexistent URLs give server error



 

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, <richter@ecos.de> 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 <rdesmond@press.uchicago.edu> 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 <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.
> 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