0

I have programmed and set up a php web application on a shared Host (using apache server). Before the server being transferred, on each page, header and sidebar and ... was loaded and displayed and each part of the script was displayed immediately after being processed. For example if data was fetched from database and being displayed in a table, after displaying table header, each row was processed and displayed and then the next row and etc. There has been a server transfer and apparently some configurations might have been changed and now each page is only displayed when the whole page is completely processed and is being displayed all at once. I was wondering what the problem might be. Thanks in advance

MehdiK
  • 37
  • 6

1 Answers1

0

The issue here is Output Buffering. What happens with Output Buffering is, the output is not sent immediately, but gets sent only after the whole page is processed including delays and sleep.

You can disable output buffering to get the same experience. But beware, you will get the dreadly Headers already sent. errors sometimes.

See How to disable output buffering in PHP to disable output buffering per page or whole.

Community
  • 1
  • 1
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252