Forum Moderators: coopster
I store files into MySQL db as binary (mediumblob). Files have size about 2 MB. I'm pushing these out using header sequention:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
//Use the switch-generated Content-Type
header("Content-Type: " . $db->Fields['FileMime']);
//Force the download
print header("Content-Disposition: attachment;
filename=" . $filename.zip');
header("Content-Transfer-Encoding: binary");
// header("Content-Length: " . strlen($db->Fields['FileContent']));
echo $db->Fields['FileContent'];
Simmilar code works good for small files, Ie pictures which I show at pages.
But in that case, with large files sometimes download slow down and stall finally. With sending COntent-Lenght is the same but problem occures for other users (in other networks).
Actualy I don't know is that problem of http server, some proxies or something else. But there must be some way to solve this problem
Thank you for any help.
Best Regards
Tough one, no doubt. I guess first things you may want to check might be some of your configuration directives ( [php.net...] ) and also remember to check your logs for any indicators.