Skip to content

Somik's Home

Server admins cheat codes

Menu
  • Bash
  • PHP
  • Arduino/ESP
  • About
    • eBook Reader
    • Codebin
    • User Management
    • Online Ruler
    • ShortURL Generator (Newer)
    • Video Downloader
    • ShortURL Generator (Older)
    • File Sharing
    • WhoIs Search
Menu

Nginx + PHP continious output

Posted on 2020-03-232020-06-06 by somik

Some times we requrire the page to display partial content, such as progress while the PHP is still working in background. In apache, disabling output buffering works fine, however for nginx, the following code need to be added on top of any PHP script (before output stats).

header('X-Accel-Buffering: no');
ob_implicit_flush(1);
June 2022
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« Jul    

Archives

  • July 2021
  • February 2021
  • September 2020
  • August 2020
  • July 2020
  • May 2020
  • March 2020
  • November 2019
  • October 2019

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2022 Somik's Home | Powered by Minimalist Blog WordPress Theme