I have a setup with Debian 9 installation and ##### ISPCONFIG ##### ISPConfig version is 3.1.13 The site is using php-fpm version 7.1 installed from deb.sury.org I want to pass data to the browser as soon as the php outputs it, so no timeouts are reached and the user knows the state of the process. However I cannot make this work with this ispconfig setup. On another server where php is loaded as module there is no such problem. Please help. Here is the mytest.php file I'm working with: PHP: <?php @ini_set('zlib.output_compression',0); @ini_set('implicit_flush',1); @ini_set('output_buffering', 'Off'); @ini_set('output_handler', ''); @ini_set('implicit_flush','On'); @ob_implicit_flush(1); @ob_end_clean(); header('Content-Encoding: none'); header("Cache-Control: no-cache, must-revalidate"); header('Content-Type: text/plain'); header('X-Accel-Buffering: no');foreach(range(1,9) as $n){ echo $n."\n"; flush(); sleep(1);}
Seems with mod_proxy_fcgi you can't disable buffering, but could stream it in chunks (of 4096 or greater), see https://stackoverflow.com/questions...-buffer-with-apache-and-php-fpm-via-mod-proxy There's a hack mentioned there of calling obflush() 21 times, I have no idea if it works.
I've tried many options and suggestions from stackoverflow and also when over the docs, but nothing worked. The option of streaming empty characters till you get 4096 bytes, works but it is not a solution for me, since the output would become a mess. I guess I'll have to switch to mod-php, as this works like a charm. Will have to wave the pros and cons between mod-php itk and php-fpm
Another option might be switch to nginx; I have no first-hand experience or a test system ready, but a quick google search at least sounds like it's configurable to disable buffering.