I'm using Moodle 2.2.1+, Apache, on Red Hat.
The following is a line from the web server log (all the errors are variations on this):
[Mon Mar 12 03:24:22 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/xxxxx/public_html/500.shtml, referer: http://my.elearning.site.com/course/modedit.php?update=759&return=0
The Moodle error log in the root directory shows:
[11-Mar-2012 18:36:21] Default exception handler: Sorry, the requested file could not be found Debug:
* line 435 of /lib/setuplib.php: moodle_exception thrown
* line 1568 of /lib/filelib.php: call to print_error()
* line 3860 of /lib/filelib.php: call to send_file_not_found()
* line 37 of /pluginfile.php: call to file_pluginfile()
So if I understand correctly, the logs chains backwards, meaning that the cause is line 37 of /pluginfile.php: call to file_pluginfile() which then caused the error in filelib etc.
The following is all of the code in /pluginfile.php:
require_once('config.php');
require_once('lib/filelib.php');
$relativepath = get_file_argument();
$forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);
file_pluginfile($relativepath, $forcedownload);
BTW - Today I tried inserting the same text and got no error. Could this be an issue with the web server, such as memory or something else?
Thanks!