Hello
Does Apache Apache/2.2.6 (Unix) buffer the CGI prints?
I am calling a perl script from a PHP server side script. In the Perl Script I have a bunch of prints and sleeps. Problem is that the browser waits for the Perl Script to complete to display the prints. The prints are intented to give the user a live status of whats going on. But browser waits till the script exits and then displays everything
I tried adding $|=1; but it did not help
I am using:
Perl:
This is perl, v5.8.8 built for i386-linux-thread-multi
Apache:
Server version: Apache/2.2.6 (Unix)
Linux:
Fedora release 8
#!/usr/bin/perl
use CGI qw(:standard);
$|=1;
my $r = CGI->new();
print header('text/html');
print start_html;
$|=1;
$r->print ("Processing ... <br>");
$|=1;
$r->print ("Processing TWO ... <br>");
foreach $i (1..2) {
sleep 10;
$r->print ("Item .. $i <br>");
}
$r->print ("DONE <br>");
print end_html;