1: # The LearningOnline Network
2: # Internal Server Error Handler
3: #
4: # (Login Screen
5: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
6: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
7: #
8: # 3/1/1 Gerd Kortemeyer
9: #
10: package Apache::lonerrorhandler;
11:
12: use strict;
13: use Apache::Constants qw(:common);
14:
15: sub handler {
16: my $r = shift;
17: $r->content_type('text/html');
18: $r->send_http_header;
19: return OK if $r->header_only;
20:
21: # ------------------------------------------------------------- Get environment
22: my $envkey;
23: my $env='';
24:
25: foreach $envkey (sort keys %ENV) {
26: $env.="$envkey: $ENV{$envkey}\n";
27: }
28:
29: $env=~s/\"/\'\'/g;
30: my $recipients=$r->dir_config('lonAdmEMail').','.
31: $r->dir_config('lonSysEMail');
32:
33: my $req=$r->as_string();
34: $req=~s/\"/\'\'/g;
35:
36: # --------------------------------------------------- Print login screen header
37: $r->print(<<ENDDOCUMENT);
38: <html>
39: <head>
40: <title>The LearningOnline Network with CAPA</title>
41: </head>
42: <body bgcolor="#FFFFFF">
43: <img src="/adm/lonKaputt/lonlogo_broken.gif" align=left>
44: <h1>Sorry!</h1>
45: <h2>Somewhere something went wrong - please help us to find out what.</h2>
46: Please take a moment to fill out the form below. Your information, together
47: with internal debugging information, will be emailed to the system and server
48: administrators.
49: <form action="mailto:$recipients" method=get enctype="text/plain">
50: <input type=submit value="Send Information">
51: <h3>Please describe what you did just before this screen came up</h3>
52: <input type=hidden name=req value="$req">
53: <textarea name=prioraction cols=50 rows=5>
54: </textarea>
55: <h3>Is this problem reproducible?</h3>
56: <input type=checkbox name=reproducible value=yes> Yes!
57: <h3>Do you have any guesses why this might have happened?</h3>
58: <textarea name=guesses cols=50 rows=5>
59: </textarea>
60: <input type=hidden name=environment value="$env"><p>
61: <input type=submit value="Send Information">
62: </form>
63: <h1>Thank you for your help!</h1>
64: </body>
65: </html>
66: ENDDOCUMENT
67: # -------------------------- Better terminate this in case something was sticky
68: $r->child_terminate();
69:
70: return OK;
71: }
72:
73: 1;
74: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>