Hi,
I'm experiencing a very weird problem when using PHP to output the contents of a file (or any data, for that matter). The beginning of the output is ok and so is the end of the file, but large portions of the middle of the file are simply lost.
I setup a very simple test case that illustrates this and hosted it in two distinct servers, the troublesome server at the planet and my own test server. The this is a very simple php script that reads a local test file (tiny_mce.js) and outputs it's content using different methods viz. readfile(), file_get_contents() and fopen()/fgets() loop/fclose(). On the test server all methods work and output the file perfectly. On the server at the planet, whichever method is used, the first ~13.100 bytes of the file come out correct and so do the last ~54.700 bytes, but ~136.000 bytes are lost in the middle. I'll keep the test online at both servers should it help to diagnose the problem. The URLs are:
http://www.conexaotelemigcelular.com.br/test.php (hosted at the planet)
http://project.mayersistemas.com/test.php (on my test server)
The issue is not limited to output from a file on disk, a similar problem was observed when outputting results from the database, as the following example shows (nb. use view document source as this intentionally returns just a chunk of html):
http://www.conexaotelemigcelular.com.br/an...usca/EstadoId:1
and
http://project.mayersistemas.com/animamusi...usca/EstadoId:1
Note the line immediately after the one that contains value 2768.
Any ideas how to solve this?
Thanks in advance.