I've got a problem in production environment, which is running dockerized Apache with PHP-FPM (image : webdevops/php-apache).
On dev server, it run in mod-php with built-in Symfony server.
On dev server I can stream a response like so:
for($i = 0; $i < 10; $i++){
echo 'Tick. ';
sleep(1);
}
The server send me a "tick" every second as expected. But on production server, it wait for 10 seconds to send me the entire response.
I guess it's related to PHP-FPM scheme as it is independent from apache.
Do someone have a workaround to do the original behavior?
(In real world, I need it to use Symfony's console in a web page, and with the current scheme, it closes the request at the beginning with a single line of text, but the provided example has the same comportment as the real function).