[Canberra-pm] Writing output to a web browser like clearing a buffer
John.Hockaday@ga.gov.au
John.Hockaday at ga.gov.au
Thu Jun 23 23:58:49 PDT 2005
Hi All,
I'm using the PERL CGI module to generate output from a submitted web form.
The content of the web page is very lengthy. It also takes a while for the
PERL script to run because it is doing a lot of processing to get the output.
I have tried emptying the buffer with the "$| = 1;" command. If I run the
script on the command line the output prints without buffering and is OK. If
I run the script from my apache web browser the header prints but then
nothing prints until the whole script is processed. I expect that users will
think that the process is not running and stop it or worse still try to run
it again.
Is there a way that I can clear the buffer to print to the browser without
having to wait for the whole page to be generated? I tried CGI "push" and
"-nph" options but these just gave me a "malformed header" error in by apache
error log file.
Thanks in advance for any help.
John Hockaday
Geoscience Australia
GPO Box 378
Canberra ACT 2601
(02) 6249 9735
http://www.ga.gov.au/
john.hockaday\@ga.gov.au
More information about the Canberra-pm
mailing list