The stuff that the server sends back comes from STDOUT if CGIs or within
mod-perl, either $req->print or a regular print since it is tied. The
error messages go to STDERR which apache redirects internalls so that the
messages go to the error log. I don't know that it's possible and I'm
certain it's not a good idea to try and circumvent that and send STDERR to
the browser. And besides that, you'd still have to send content-type
headers. I suppose you could write one perl program that executes your
perl program of interest from within an eval block and capture the output
that way. But isn't simply looking at the error log easier?
-- Rob
--On Monday, August 21, 2000 8:56 AM -0500 Jay Strauss
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm asking this again, due to lack of response (but I can't believe no
> one out there knows how to do this).
>
> How do I produce an error page (in HTML), when I call the script from a
> browser, that looks just like the error screen I get when I run a script
> at the command line?
>
> That is, if I run the following script from the command line:
>
> -------
> #!/usr/bin/perl -w
>
> use strict;
> use diagnostics;
>
> ($first, $second) = @ARGV;
>
> exit;
> -------
>
> I'll get a whole bunch of messages telling me I "use strict" and I have
> variables that I didn't define with "my".
>
> But, if I call it from my browser, I just get back a "Internal Server
> Error" page. Instead I want all the diagnostics messages.
>
> Thanks
> Jay
>
> Jay Strauss
> [EMAIL PROTECTED]
> (h) 773.935.5326
> (c) 312.617.0264
>
>
_ _ _ _ _ _ _ _ _ _
/\_\_\_\_\ /\_\ /\_\_\_\_\_\
/\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
/\/_/_/_/_/ /\_\ /\/_/ /\/_/
/\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
\/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
Rob Tanner
McMinnville, Oregon
[EMAIL PROTECTED]