Lyle <> wrote:
> Hi All,
>   Every time I've setup ActivePerl on IIS, be it IIS 5, 6 or now 7,
> everything I print to STDERR gets sent to the browser. 
> 
> This can cause some weird problems. This simple test script:-
> 
> #!perl
> print "Content-type:text/plain\n\n";
> print "TEST\n";
> print STDERR "STDERR test\n";
> 
> 
> Causes the following error on IIS7
> <h2>HTTP Error 502.2 - Bad Gateway</h2>
>   <h3>The specified CGI application misbehaved by not returning a
> complete set of HTTP headers.  The headers it did return are "STDERR
> test Content-type:text/plain  
> 
> TEST
> ".</h3>
> 
> So even though the STDERR test is printed last, it's going to the
> browser first. 
> 
> Is this a problem with IIS config? Any pointers?

I am not a CGI expert, but it was my understanding that anything written
to STDERR was normally directed to the error log. I know nothing of IIS,
but I would hope that it could be configured to do the same.

Of course your post leads to the question of why you are writing
directly to STDERR. If you are using CGI::Carp, you can direct error
messages to STDOUT, STDERR, or a log file of your choice.

HTH

-- 
Brian Raven 

-----------------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to