Moodle file.php returns empty file with 0 bytes bytes
For some reason one installation of Moodle 1.9.3+ has a problem that the .php file sometimes returns an empty byte file, even the apache log shows 0 bytes. Another moodle installation works with the same htm files.
What could be causing this? Problematic files are regular htm files - the error occurs with links like:
http: //server/file.php/164/moddata/scorm/4/data/msg.htm
(Problematic moodle has been upgraded from 1.8 earlier)
source to share
I'm having trouble uploading binaries with file.php, I think it was not displaying correctly as 0 bytes (but I'm not sure). It turned out that at the beginning of jpg files a new line character appeared, the reason was a new line in the config.php file after the end? >
I'm not a PHP programmer, but I've seen suggestions to remove the ending? > in php-only files to minimize this issue.
Hope this helps. Johan Karlsson
source to share