I this something that is set and controled somehow with Perl? Or is it a setting on the webserver (IIS and Apache)?

If your script does nothing with STDERR other than write to it, then what happens will be determined by the webserver. What the webserver does by default and how to configure it depends on your webserver. Consider that you may be running IIS, Apache or some other server. With IIS your script may be run by perl.exe as a CGI script or by perlis.dll as an ISAPI plugin. With Apache, your script may be run as a CGI script or you may be running mod_perl, fastCGI or some other context. You will have to investigate the specifics of your servers to learn the defaults and options.

But, your script can do more than just write to STDERR. It can close STDERR as provided by the server and re-open it connected to a file or process of your chosing. So the script can also determine what happens with data written to STDERR.

And, many error messages can be diverted to other destinations before they are written to STDERR (e.g. use CGI::Carp qw(fatalsToBrowser)). Other responses provide several good alternatives for redirection of error messages within your scripts.


In reply to Re: Output of STDERR - Probably an easy one by ig
in thread Output of STDERR - Probably an easy one by cosmicperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.