This question has been raised hundred of times in various fora; some have been solved, some not. I checked plenty of resources, but my issue could not be resolved. I am gene
simple solution :
write below lines before stream, it will show where exactly new line or space is coming
$f; $l; if(headers_sent($f,$l)) { echo $f,'',$l,''; die('now detect line'); }