Perl CGI Apache 2.0 print STDERR not appearing in error_log 
Author Message
 Perl CGI Apache 2.0 print STDERR not appearing in error_log

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.



Mon, 07 Mar 2005 19:02:42 GMT  
 Perl CGI Apache 2.0 print STDERR not appearing in error_log

(snipped)

Quote:
>   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.

Look at line ninety-three in your script. You have
inadvertently created a postmortem bug. A cure for
this is to move line ninety-three to line eleven.

Purl Gurl



Mon, 07 Mar 2005 19:15:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Possible Apache 2.0 / mod_perl print bug?

2. Perl line numbers vs Apache error_log reported numbers?

3. CGI.pm not dancing well with httpd 2.0 and mod_perl

4. CGI.pm and Netscape 2.0/Mosaic 2.0

5. perl .cgi extensions not wlrking with apache 1.3.22

6. Apache server not recognising perl scripts in cgi-bin

7. Not able to run PERL script as CGI by Apache

8. perl switches do not appear to be parsed?

9. Unwanted characters appear during a print command

10. Slightly OT: mod_perl and apache 2.0

11. Apache 2.0 logging to MySQL with DBI

 

 
Powered by phpBB® Forum Software