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)

+1


source to share


4 answers


A completely empty answer may indicate a PHP error; check the PHP error log.



+4


source


I had this with a recent XAMP install, it did it every time the file was saved as UTF8 (which my Visual Studio did automatically). Worked on every installation separate from my XAMP test box.



0


source


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

0


source


Disable all the features of your moodle system and repeat the test.

0


source







All Articles