Skip to content

Instantly share code, notes, and snippets.

View ivan-cc's full-sized avatar
🙀
Oh my Сode!

Ivan ivan-cc

🙀
Oh my Сode!
View GitHub Profile
@hranicka
hranicka / ob.php
Last active May 5, 2023 14:52
PHP flush() under Apache, mod_proxy, php-fpm
<?php
function doFlush()
{
if (!headers_sent()) {
// Disable gzip in PHP.
ini_set('zlib.output_compression', 0);
// Force disable compression in a header.
// Required for flush in some cases (Apache + mod_proxy, nginx, php-fpm).