NYCPHP Meetup

NYPHP.org

[nycphp-talk] flush usage

CHUN-YIU LAM chun_lam at hotmail.com
Sat Feb 15 03:53:02 EST 2003


try setting "WriteBufSize" to 2500.  This is the number of byte buffer in 
Apache before sending... in the httpd.conf






----Original Message Follows----
From: Carlos Hoyos <cahoyos at us.ibm.com>
Reply-To: talk at nyphp.org
To: NYPHP Talk <talk at nyphp.org>
Subject: [nycphp-talk] flush usage
Date: Thu, 13 Feb 2003 13:26:11 -0500
Received: from parsec.nyphp.org ([66.250.131.26]) by mc8-f3.law1.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.5600); Thu, 13 Feb 2003 10:26:34 -0800
Received: from nyphp.org (parsec.nyphp.org [66.250.131.26])by 
parsec.nyphp.org (8.12.6/8.12.6) with ESMTP id h1DIQB7e091109for 
<chun_lam at hotmail.com>; Thu, 13 Feb 2003 13:26:33 -0500 (EST)(envelope-from 
null at nyphp.org)
X-Message-Info: dHZMQeBBv44lPE7o4B5bAg==
Message-Id: <200302131826.h1DIQB7e091109 at parsec.nyphp.org>
X-Paralist-Archived: <http://nyphp.org/list/paralist_archive.php?L_mid=2994>
X-List-Software: Paralist 0.6
List-ID: <nyphptalk.nyphp.org>
List-Owner: <mailto:listmaster at nyphp.org>
List-Archive: <http://nyphp.org/list/paralist_archive.php?L_lid=1>
List-Subscribe: <http://nyphp.org/list/>
List-Unsubscribe: <http://nyphp.org/list/>
Organization: New York PHP
X-Mailer: Paramail 0.5
Return-Path: null at nyphp.org
X-OriginalArrivalTime: 13 Feb 2003 18:26:35.0113 (UTC) 
FILETIME=[7080BD90:01C2D38D]

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



--- Unsubscribe at http://nyphp.org/list/ ---


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the talk mailing list