You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2003/03/04 00:15:16 UTC

STDERR and XML::LibXSLT problem

it's nice to have each problem in a separate thread. thanks.

Kurt George Gjerde wrote:
 > BTW: I've fixed my "can't coerce GLOB to string" problem I had last week.
 > Was unrelated to mod_perl (sorry). It seems XML::LibXSLT produced some
 > errors which went straight to STDERR. Under CGI these ends up in the
 > error_log but under mod_perl it seems STDERR is just a black hole (?).
 > Would it be possible to map STDERR to log_error()?

Unless I'm missing something, mod_perl doesn't do anything special with STDERR 
(it does tie STDIN and STDOUT for 'perl-script' handlers). Apache opens stderr 
to error_log, and then everything just works. e.g. if you do:

warn "Foo";
or
print STDERR "OOOPS\n";

this ends up in error_log, no?

I suppose that XML::LibXSLT redefines STDERR then. Try to see what it does to 
create this problem.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: STDERR and XML::LibXSLT problem

Posted by Kurt George Gjerde <ku...@intermedia.uib.no>.
On Tue, 4 Mar 2003, Stas Bekman wrote:

> Kurt George Gjerde wrote:
>  > BTW: I've fixed my "can't coerce GLOB to string" problem I had last week.
>  > Was unrelated to mod_perl (sorry). It seems XML::LibXSLT produced some
>  > errors which went straight to STDERR. Under CGI these ends up in the
>  > error_log but under mod_perl it seems STDERR is just a black hole (?).
>  > Would it be possible to map STDERR to log_error()?
>
> Unless I'm missing something, mod_perl doesn't do anything special with STDERR
> (it does tie STDIN and STDOUT for 'perl-script' handlers). Apache opens stderr
> to error_log, and then everything just works. e.g. if you do:
>
> warn "Foo";
> or
> print STDERR "OOOPS\n";
>
> this ends up in error_log, no?

Just found out what the problem is. I'm using virtual hosts and have
separate error logs for each host. While $r->log_error() outputs to the
virtual host's error log, print STDERR (and warn, etc) outputs to the
default (global) error log (under regular cgi STDERR outputs to the
virtual host's log).


thanks,
-Kurt.
__________
kurt george gjerde <ku...@intermedia.uib.no>
intermedia uib, university of bergen

Will work for money.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org