NYCPHP Meetup

NYPHP.org

flush usage

Carlos Hoyos cahoyos at us.ibm.com
Thu Feb 13 13:26:04 EST 2003






Hi,
(sorry if this gets posted twice, I had sent it on Monday but never saw it
on the list.)


I have a page that deals with a lengthy process, so I'm using flush to
"push" the content as it's processed and give the user a feeling of page
"in process":
Something like this


#start

initialization();

foreach($urlList as $url){


      // execute a lengthy process...
      doLengthyProcess();
      printResults();

      // flush to get the "partial" results displayed.
      print str_repeat(" ", 3000) . "\
";
      flush();

}

restOfScript();


But it's not working... blank page until the end of execution.  I believe
it's more of a server / client issue (rather than php), and have to do some
homework on this; but I thought it would be nice to see if anybody wants to
share ideas or suggestions on how you've worked with this situations in the
past.

I'm running php4.3.0,  IBMHTTPServer (ibm's apache build), no mod_gzip,
over Linux... testing on IE 5.0, Netscape 4.7 and Opera 6.0... all failed.
The 3000 in the str_repeat is just any number... just trying to fill any
buffers that might be preventing this from working properly.

txs,


Carlos




More information about the talk mailing list