Trying to force-download file with PHP using usual:
header("Content-type: $type" );
header("Content-Disposition: attachment; filename=$name");
header('Content-Length: ' . filesize($path));
And it does successfully for files somewhere below 32 mb. For bigger ones it just returns zeroed file.
Obviously there’s some kind of limit, but what sets it? Using Apache 2.2.11 and PHP 5.3.0.
I eventually stumbled on this post: http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/.
Adding all the headers recommended there and also using:
before any output – has helped. No more limitations observable. Files download completely even huge ones.