Some process in PHP sends messages while it goes.
for ($i = 0; $i < 10; $i++) {
echo "message $i<br>";
sleep(3);
}
But user doesn't see any message until this process ends. Output buffering in PHP disabled. I'm a client of web-hosting with Apache-server. How to prevent output buffering in .htaccess?
In PHP
ini_set('output_buffering', 0);
- no effectini_set('output_buffering', 'off');
- no effectwhile(ob_end_flush()); flush();
- no effectob_implicit_flush(true); ob_end_clean();
- no effect
In .htaccess
php_flag output_buffering off
- no effectphp_value implicit_flush on
- no effect
Works only:
echo str_repeat(' ', 32768);
but it's terrible.