Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Perl CGI Apache 2.0 print STDERR not appearing in error_log

by hmerrill (Friar)
on Sep 19, 2002 at 12:34 UTC ( #199156=perlquestion: print w/ replies, xml ) Need Help??
hmerrill has asked for the wisdom of the Perl Monks concerning the following question:

This seems like a strange one to me - I've been writing Perl CGI scripts with Apache 1.3 for the last 2+ years, and I've always known
print STDERR "Some text\n";
to go to the Apache error_log.

However, I recently(2 days ago) upgrade my machine to
perl 5.8.0 Apache/2.0.40
and now I have this situation - I have a Perl CGI script that does 'print STDERR "TOP of script A\n";' at the top - this script POST's back into itself by *not* including an ACTION. The 1st time into the script, the print appears in the Apache error_log, but after the POST I *don't* see the message appear in the error_log the 2nd time. But I know it is coming back into the same script because if I remove the STDERR from that print(so that the print is then printing to STDOUT), I get the typical "bad header" message.

Anyone know what's going on here?

Any and all help is appreciated.

Thanks.

Replies are listed 'Best First'.
Re: Perl CGI Apache 2.0 print STDERR not appearing in error_log
by janx (Monk) on Sep 19, 2002 at 13:59 UTC
    I have seen similar behavior (getting all output on STDERR instead of STDOUT) when moving to mod_perl/apache 2.
    This was some time (talk 3-4 months at least) ago, and was somehow related to a change perlio interface in newer perls.
    I'm probably not much of a help to you, but maybe it's a pointer for you.

    regards,
    janx

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://199156]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-07-24 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (221 votes). Check out past polls.