We have written a page that works fine on our test Apache server, but fails on the live server.
The page allows the user to download jpg images by clicking on a thumbnail.
We force the download by using the following code:
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename=' . basename($file));
// Read the file from disk
It seems to find the file but the resulting file is always 1 byte in length.
QUESTION: Is there some setting on our server that disallows the forced download of octet stream, binary stream etc?