Ooops, sorry, that was suppose to go someone, not the list.....
Jeff Macdonald wrote:
>
> Paul,
> Below is an email I sent to the mod_perl list. It seems that the lastest
> version of mod_perl does indeed do this correctly. I was wondering since
> you have the latest mod_perl/apache/perl, could you try this out? If you
> don't have time, that's ok, as I will be compiling all the latest stuff
> tomorrow from scratch on us6 using the GCC that you have installed
> somewhere....
>
> ----
>
> Hi,
> I found this interesting tidbit from the Eagle book on page 460:
> ... In addition, the message will be saved in the request's notes
> table, under a key named error-notes. ...
>
> And on page 454:
> ... For example, the logging API saves error messages under a key named
> error-notes, which could be used by ErrorDocuments to provide a more
> informative message. ...
>
> So this make me think that I could do something like this:
>
> package MyError;
>
> use strict;
> use Apache::Constants qw(:common);
>
> sub handler {
> my $r=shift;
>
> my $error=$r->notes('error-notes');
>
> $r->content_type('text/html');
> $r->send_http_header();
> $r->print(<<END);
> <html>
> <head><title>Error Test</title></head>
> <body>The error stored in error-notes is: $error</body>
> </html>
> END
>
> return OK;
> }
>
> 1;
>
> in httpd.conf:
>
> ErrorDocument 500 /error
>
> <Location /error>
> SetHandler Perl-script
> PerlHandler MyError
> </Location>
>
> My thinking is that $error would contain the error recorded in the
> error_log file.
>
> Instead $error is empty. Any thoughts?