I've been having a strange downloading problem with PHP that I've managed to narrow down to the above snippet. If IE7, IE6, Opera 9.23, or lynx attempts to follow a link to www.example.com/download_test.php the file fails to completely transfer. When going to www.example.com/qsfportal-1.4.0.tar.gz the file transfers through fine. So I think I've reasonably eliminated an Apache problem.
Firefox 2.0.0.6 has no issues downloading the file using either method, repeatedly.
Can anyone shed some light on what might be going wrong?
BTW, this is in relation to our problem here with "corrupted" downloads. They're not really corrupted. They're victims of this problem.
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=qsfportal-1.4.0.tar.gz");
header("Content-Length: " . filesize("./qsfportal-1.4.0.tar.gz") );
header("X-Robots-Tag: noarchive, nosnippet, noindex");
echo file_get_contents( './qsfportal-1.4.0.tar.gz');
?>[/php]
I've been having a strange downloading problem with PHP that I've managed to narrow down to the above snippet. If IE7, IE6, Opera 9.23, or lynx attempts to follow a link to www.example.com/download_test.php the file fails to completely transfer. When going to www.example.com/qsfportal-1.4.0.tar.gz the file transfers through fine. So I think I've reasonably eliminated an Apache problem.
Firefox 2.0.0.6 has no issues downloading the file using either method, repeatedly.
Can anyone shed some light on what might be going wrong?
BTW, this is in relation to our problem here with "corrupted" downloads. They're not really corrupted. They're victims of this problem.