NOTE: the following code works just fine for files of like a megabyte or even 10 - I'm testing where this fails right now. And it's worked for years:
$nameAs=preg_replace('/^[a-z0-9]+_/i','',$file);
header ("Accept-Ranges: bytes");
header ("Connection: close");
header ("Content-type: application/octet-stream");
header ("Content-Length: ". filesize($path));
header ("Content-Disposition: attachment; filename=\"$nameAs\"");
readfile($path);
exit;
Is there some issue with apache or php.ini file which might be causing a prblem? I am running PHP version 4.4.8
Thanks for your help on this.
Samuel