At home, I'm trying to create a SSE Endpoint to use over website, true.
Then,I have the code fragment that's keeps request open, obviously (while( true )
) ...
So then, I echo something and then use ob_flush()
and flush()
inside.
But, at home it's works properly, at remote host, no.
Localhost definition.
System: Linux localhost 3.6.10-2.fc17.x86_64 #1 SMP Tue Dec 11 18:07:34 UTC 2012 x86_64
Server API: Apache 2.0 Handler
setting local value master value
output_buffering 0 0
output_handler no value no value
And in server ... ( remote )
Linux web521.xxx.net 3.2.2 #1 SMP Wed Feb 1 09:54:51 BRST 2012 x86_64
Server API FPM/FastCGI
setting local value master value
output_buffering no value no value
output_handler no value no value
Code fragment:
<?php
while( true ) {
// ...
echo '...';
ob_flush();
flush();
usleep( 50000 );
// ...
}
?>