I'm having problems with apache2 on Ubuntu ( 11.04 and 12.04 ) buffering all cgi output until the script terminates. If I run the same script on Centos/rhel 6.2 apache2, it runs normally.
#!/usr/bin/perl
$|=1;
print "Content-type: text/html\r\n\r\n";
print "hi..";
sleep 1;
print "hi..";
sleep 1;
print "hi..";
sleep 1;
I have verified that mod_deflate is disabled.
Also, it's NOT just a perl thing, the same cgi script written in bash behaves the same on Ubuntu VS centos/rhel.