I'm running pretty much the code in the above post, but for some reason the maximum file transfer size is 1.9MB. I've checked all the usual memory settings and it doesn't look like a PHP issue (that is, I've got it allocated the 8MB it wants; not that this effects anything, but it's just one more thing I'm sure is not wrong with it). Any hints on what might fix this?
(dl_file include directory information, file_name does not; for what it matters, consider them the same)
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" );
header( "Content-Type: audio/mpeg" );
//header( "Content-Length: " . filesize( $dl_file ) );
header( "Content-Disposition: attachment; filename=\"$file_name\";" );
header( "Content-Transfer-Encoding: binary" );
@readfile( $dl_file );
No, it doesn't work even if Content-Length is uncommented. If I print out filesize( $dl_file ) on the page, it registers correctly, thus making this ever more the mystery.
Thanks.