Text causing Error 500?!

Text causing Error 500?!

Yehuda Zimmerman -
回帖数:3

I am getting an internal error 500 from the server when I try creating a page with specific text. There are no special symbols or anything else strange in the text. I checked the HTML, and even with just a <p> tag at the start and a </p> at the end, with nothing other than the following text, I am getting an error.

Attach the device to the selected area (remove the protective cover from the adhesive tape). 

Remove transparent protecting cover from the display surface

I have this problem on a few other pages as well, but I can't figure it out.

Is this a Moodle bug or am I doing something wrong?

Please help!

回复Yehuda Zimmerman

Re: Text causing Error 500?!

Guillermo Madero -

You should definetely check your server error logs, as error 500 is quite ambiguous. It would seem to me that there is a permission problem somewhere.

What moodle version, web server, etc. are you working with?

回复Guillermo Madero

Re: Text causing Error 500?!

Yehuda Zimmerman -

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!

回复Yehuda Zimmerman

Re: Text causing Error 500?!

Guillermo Madero -

The server error line only tells that modedit.php?... tried to open file 500.shtml, which was not found. I would try and see if there are any other relevant lines.

Yes the log is read down to bottom.

Yes, error 500 is always a web server issue, which of course can be caused by an app problem (code bug, etc.).