PHP offered download interrupted after X number of KB everytime

I have written a code that offers visitors to download a csv file which is of 1.1M in size. If one visits this script, download is interrupted around 30-40K (as shown below in wget output) while if he downloads it via a direct link like http://domain.com/events.csv it works just fine. I believe this has something to do with php configuration values on the server but i have played almost with all values[relevant and non-relevant] such as

If i remove the header() required to offer a download and just echo the contents, then Chrome shows that the test.php was around 1.09M plus some more request, adds upto 1.1M[even in this case wget of test.php shows same behaviour as above], while firefox firebug shows that request was between 140K-300K[still not displaying all contents.