Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl

error document

 

 

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded


bkim at coe

May 31, 2007, 3:33 AM

Post #1 of 4 (2162 views)
Permalink
error document

Hi,

I reported a related problem once but didn't get a good answer last time... I
thought I'd try again.

We are on
Apache/2.2.4 Embperl 2.2.0 mod_perl/2.0.3
but not using Embperl Objects.

I'm trying to solve the problem of 500 errors not showing custom error
document, after the server is accessed a couple times. If I gracefully restart
the apache, it shows correct error document a couple times. Then, after that,
anything that causes 404 will show embperl's own 500 page, not my custom page.

This happens only for pages that have file extensions handled by embperl.
If I have <FilesMatch ".*\.epl$|.*\.html">, .htm just behaves as expected.
(custom error page shows, regardless of how many times I try.)

I have both
optReturnError = 262144
optRedirectStdout = 16384

PerlSetEnv EMBPERL_OPTIONS 278528
PerlSetEnv EMBPERL_DEBUG 10477

The log shows difference between the two.

Log entries for initial accesses (custom page is shown)
====================

On initial access to custom error pages, the error in embperl log is as
follows:

[30133]REQ: ***** Start Request at Tue May 29 13:23:12 2007
[30133]Use App: Embperl
[30133]Formdata... length = 0
[30133]Using APACHE for output...
[989] Use Recipe Embperl
[989]SYNTAX: switch to Embperl::Syntax::Embperl
[30133]Reading [snip]/testke.epl as input using PerlIO (0 Bytes)...
[30133]ERR: 404: testke.epl(1): Not found '[snip]/testke.epl', searched: No
such file or directory
...
[30133]REQ: ***** Start Request at Tue May 29 13:23:12 2007
[30133]Use App: Embperl
[30133]Formdata... length = 0
[30133]Using APACHE for output...
[989] Use Recipe Embperl
[989]SYNTAX: switch to Embperl::Syntax::Embperl
[30133]Reading [snip]/500.epl as input using PerlIO (643 Bytes)...
...
[30133]Request finished. Tue May 29 13:23:12 2007


Log entries thereafter (custom page is not shown)
======================
[987]SYNTAX: switch to Embperl::Syntax::Embperl
[30133]ERR: 404: testkke.epl(1): Not found '[snip]/testkke.epl', searched: No
such file or directory

or [947]SYNTAX: switch to Embperl::Syntax::Embperl
[30133]ERR: 24: Error in Perl code: Died at
[snip]/teste.epl line 2.


As you see, the log entries are quite short (just two lines) for subsequent
accesses. The PerlIO line is gone.

This is a problem for me since all 404 errors are showing this not so pretty
error page. Is this only for me? Is anyone willing to share a working
configuration?


Thanks.

Ben K.
Developer
http://benix.tamu.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


richter at ecos

Jun 6, 2007, 11:15 PM

Post #2 of 4 (2007 views)
Permalink
RE: error document [In reply to]

Hi,

I guess the problem might happen when the same child serves the page
again, so the initialisation is skiped.

Could you try to run httpd with the -X option, so you have only one
process. Does it now fail the second request?

Gerald


------------------------------------------------------------------------
--
Gerald Richter ECOS electronic communication services GmbH
******************* SECURING YOUR NETWORK ********************

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter [at] ecos Voice: +49 6133 939-122
WWW: http://www.BB-5000.info Fax: +49 6133 939-333

Sitz der Gesellschaft: Dienheim; AG Mainz HRB 6889; GF: W.Heck,
G.Richter
------------------------------------------------------------------------
--



> -----Original Message-----
> From: Ben Kim [mailto:bkim [at] coe]
> Sent: Thursday, May 31, 2007 12:34 PM
> To: embperl [at] perl
> Subject: error document
>
>
> Hi,
>
> I reported a related problem once but didn't get a good
> answer last time... I thought I'd try again.
>
> We are on
> Apache/2.2.4 Embperl 2.2.0 mod_perl/2.0.3 but not using
> Embperl Objects.
>
> I'm trying to solve the problem of 500 errors not showing
> custom error document, after the server is accessed a couple
> times. If I gracefully restart the apache, it shows correct
> error document a couple times. Then, after that, anything
> that causes 404 will show embperl's own 500 page, not my custom page.
>
> This happens only for pages that have file extensions handled
> by embperl.
> If I have <FilesMatch ".*\.epl$|.*\.html">, .htm just behaves
> as expected.
> (custom error page shows, regardless of how many times I try.)
>
> I have both
> optReturnError = 262144
> optRedirectStdout = 16384
>
> PerlSetEnv EMBPERL_OPTIONS 278528
> PerlSetEnv EMBPERL_DEBUG 10477
>
> The log shows difference between the two.
>
> Log entries for initial accesses (custom page is shown)
> ====================
>
> On initial access to custom error pages, the error in embperl
> log is as
> follows:
>
> [30133]REQ: ***** Start Request at Tue May 29 13:23:12 2007
> [30133]Use App: Embperl [30133]Formdata... length = 0
> [30133]Using APACHE for output...
> [989] Use Recipe Embperl
> [989]SYNTAX: switch to Embperl::Syntax::Embperl
> [30133]Reading [snip]/testke.epl as input using PerlIO (0 Bytes)...
> [30133]ERR: 404: testke.epl(1): Not found
> '[snip]/testke.epl', searched: No
> such file or directory
> ...
> [30133]REQ: ***** Start Request at Tue May 29 13:23:12 2007
> [30133]Use App: Embperl [30133]Formdata... length = 0
> [30133]Using APACHE for output...
> [989] Use Recipe Embperl
> [989]SYNTAX: switch to Embperl::Syntax::Embperl
> [30133]Reading [snip]/500.epl as input using PerlIO (643 Bytes)...
> ...
> [30133]Request finished. Tue May 29 13:23:12 2007
>
>
> Log entries thereafter (custom page is not shown)
> ======================
> [987]SYNTAX: switch to Embperl::Syntax::Embperl
> [30133]ERR: 404: testkke.epl(1): Not found
> '[snip]/testkke.epl', searched: No such file or directory
>
> or [947]SYNTAX: switch to Embperl::Syntax::Embperl
> [30133]ERR: 24: Error in Perl code: Died at
> [snip]/teste.epl line 2.
>
>
> As you see, the log entries are quite short (just two lines)
> for subsequent accesses. The PerlIO line is gone.
>
> This is a problem for me since all 404 errors are showing
> this not so pretty error page. Is this only for me? Is anyone
> willing to share a working configuration?
>
>
> Thanks.
>
> Ben K.
> Developer
> http://benix.tamu.edu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe [at] perl
> For additional commands, e-mail: embperl-help [at] perl
>
>
> ** Virus checked by BB-5000 Mailfilter **
> !DSPAM:416,465ea702112691079068920!
>
>

** Virus checked by BB-5000 Mailfilter **

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


bkim at tamu

Jul 6, 2007, 1:26 PM

Post #3 of 4 (1930 views)
Permalink
RE: RE: error document [In reply to]

I ran the tests, and the result is as follows.

> Both test will fail, but when you look at test/tmp/out.htm after each
> test, you should see the sentence "This page is shown due to an
> ErrorDocument redirection".

> make test TESTARGS="-h errdoc/errdoc.htm"

Same as test/cmp/errdoc.htm
This page is shown due to an ErrorDocument redirection

> make test TESTARGS="-h errdoc/epl/errdoc2.htm"

Similar to test/cmp/errdoc2.htm. I can see
This page is shown due to an ErrorDocument redirection

> Especialy there should be no bus error or similar.

There was no bus error.


Thanks.

Ben K.
Developer
http://benix.tamu.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


richter at ecos

Jul 9, 2007, 3:52 AM

Post #4 of 4 (1916 views)
Permalink
RE: RE: RE: error document [In reply to]

>
> I ran the tests, and the result is as follows.
>

That sounds ok.

In this case could you please run your httpd under gdb with the -X
option e.g.

gdb --args /path/to/httpd -f /path/to/httpd.conf -X

Then do the request where you get the bus error and at the gdb prompt
type

bt

And send me the output.

Gerald

P.S. I am out of office for the next two weeks, so I will not be able to
answer before

> > Both test will fail, but when you look at test/tmp/out.htm
> after each
> > test, you should see the sentence "This page is shown due to an
> > ErrorDocument redirection".
>
> > make test TESTARGS="-h errdoc/errdoc.htm"
>
> Same as test/cmp/errdoc.htm
> This page is shown due to an ErrorDocument redirection
>
> > make test TESTARGS="-h errdoc/epl/errdoc2.htm"
>
> Similar to test/cmp/errdoc2.htm. I can see
> This page is shown due to an ErrorDocument redirection
>
> > Especialy there should be no bus error or similar.
>
> There was no bus error.
>
>
> Thanks.
>
> Ben K.
> Developer
> http://benix.tamu.edu
>
> ** Virus checked by BB-5000 Mailfilter **
> !DSPAM:416,468ea5ee277051336657731!
>
>

** Virus checked by BB-5000 Mailfilter **

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.