4 July 2012

unknown file size while downloading via php script

if your browser doesn't appear to be obeying the headers generated by your PHP script—especially Content-Length—it is fairly likely that Apache's mod_deflate extension is enabled.
You can easily disable it for a single script using the following line in an applicable .htaccess file: 
SetEnvIfNoCase Request_URI ^/download\.php no-gzip dont-vary
thanks to http://paul.luminos.nl/show_post.php?p=471