You could use the ErrorDocument directive and make it point to a page that uses some server-side technology. For example, this should work if you have PERL installed on your server.
In .htaccess (or httpd.conf):
ErrorDocument 500 /script.pl
In script.pl:
#!/path/to/perl
my $error = 'tail -1 /path/to/error_log';
print "Content-type: text/html\n\n";
print <<_PAGE_;
<html>
<head>
<title>Error 500 - Internal Server error</title>
</head>
<body>
This is the error:<br>
$error
</body>
</html>
_PAGE_; //Daniel
This it odd. Now it gives a "The page cannot be displayed" message. You know the default one that is used by your browser.
It only occurs when a script encounters errors. The error log reports the following error when doing the above mentioned thing:
31 21:01:18 2002] [error] [client 127.0.0.1] Premature end of script headers: c:/sierra/op2map/cgi-bin/mapeditor/upload.cgi
[Wed Jul 31 21:01:18 2002] [error] [client 127.0.0.1] Could not open file C:\Old System\Sierra\New Folder\Outpost 2 CD.zip\mp6_01.map: No such file or directory
As a bit of information the script is trying to open that file but it's not there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.