Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

PHP Buffered Output not flushing to browser (IIS8)

$
0
0

Hello,

I am having some issues with flushing the buffered output to the browser and i thought i should ask here.
No matter what i tried, i cannot seem to make php output echos while it's running the script.

After many hours of research i gave up and thought i should ask for some help. The search feature on this web site doesn't work so please don't tell me to search the forums first, as i have tried :)

I am using IIS 8.

Ok, so i am running a large PHP script with Oracle (OCI8) integration and here is what it basically does:

foreach($items as $itemarray){
	echo " <tr>\n";
			$error = checkValuesAndDisplay($itemarray);
			if($error[0]){ $fail = true;}
			if($error[1]){ $options = true;}
echo " </tr>\n";
}

Basically the function checkValuesAndDisplay checks some items to see if they are in the database and returns some errors depending on what it finds.

Now, the $itemarray has a lot of items in it, sometimes even thousands. Script execution sometimes can take upwards of 20 minutes.

The problem i'm having is that i cannot seem to get it to flush the output after each iteration.

I tried this here: http://forums.iis.net/t/1078563.aspx/1

I added responseBufferLimit="1024", i made sure output_buffering and implicit_flush is set to 0 in php.ini. (i also tried responseBufferLimit to 0)

Then i tried adding a flush() and usleep(50000) at the end of the function, no luck. I even added ob_flush() and that also didn't work. (I shouldn't have to add ob_flush as output_buffering is 0 in php.ini).


At first i thought this is due to me using chrome, but i tried on IE9 and IE10 and same thing there... 

Does anyone have any ideas as to what else i could try?

Thanks in advance!


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>