This problem is mainly occurred when we export some data to CSV,XML,etc. In order to solve this problem, you have to check whether you have used “echo” or “print” before any header line, then and then only the error is occurred.
In some cases, this type of can be solved by using ob_start() and ob_end_flush() function at the top and the bottom of the page respectively.
Please Note: Detailed information about this error will be updated soon in this post only.