in reply to Running Command Line Programs from a CGI Script

Some years ago I had a similar problem with random sendmail problems. To solve it I tried put header first, but the response is redirect stderr. (Previous sugest by Solo)

Some time after I think again about and concludes with separated buffers handled by apache web server...

When your command-line binary end, flush STDERR, before your STDOUT flushed by your cgi.

Today I like to put three lines on start my codes...

  • use strict;
  • use warnings; (or -w at shebang line)
  • $|++; # (Update: auto flush handles, like autoflush call on IO::Handle)

    --
    Marco Antonio
    Rio-PM

    • Comment on Re: Running Command Line Programs from a CGI Script