LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   PHP (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=19)
-   -   defeat buffered output in PHP for realtime display? (http://www.litespeedtech.com/support/forum/showthread.php?t=2028)

aww 05-02-2008 08:10 AM

defeat buffered output in PHP for realtime display?
 
Some of the tricks I try to use in PHP to typically defeat the output buffering to diagnose the output of long scripts does not seem to be working with LiteSpeed.

I suspect this is because LiteSpeed tries to gather the output so it can compress+chunk it (typically in 4k blocks).

Is there any trick I can use to defeat the buffer effect on a per-script basis?

None of these solve the problem:
ini_set('output_buffering', 0);
ini_set('implicit_flush', 1);
ob_end_flush();

aww 05-02-2008 08:19 AM

It took a bit of googling but I found the answer that works on apache and I believe it works on LiteSpeed as well:

after each echo, or other output, put a:
ob_flush(); flush();

(I had only put ob_flush(); )

Mitch 10-24-2012 05:48 PM

Hi there.

Sorry to bump a 4 year old thread but I couldn't find a more relevant thread and I'm having the same issues.

No matter what variations of code I use I'm not able to flush the output buffer

ie.

PHP Code:

ini_set('output_buffering'0); 
ini_set('implicit_flush'1);
ob_end_flush();

for(
$i=0$i<10$i++){
    echo 
$i;
    
sleep(1);
    
ob_flush();
    
flush();


Has anyone else been able to successfully flush(); ?

Mitch 10-24-2012 05:59 PM

Please note that I've disabled gzip compression (and dynamic compress) on litespeed and it's made no difference

NiteWave 10-24-2012 06:59 PM

what's your lsphp5 settings?

check

Server->External App->lsphp5

Mitch 10-25-2012 10:16 PM

Quote:

Originally Posted by NiteWave (Post 35516)
what's your lsphp5 settings?

Specifically which settings?

Mitch 10-25-2012 10:19 PM

Persistant Connection is on, Instances is set to 1, Response Buffering is set to No.

Is Response Buffering the issue here?


All times are GMT -7. The time now is 12:36 AM.