Show php errors on 404 page

Re: Ri: Show php errors on 404 page

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

The standard debug settings in Moodle can be enabled via the web interface or in config.php.

I can think of two scenarios resulting in 404 Not Found:

  1. The web server program (e.g. Apache) will return 404 if it cannot find the requested resource (e.g. https://moodle.example.com/bad_file.php). In this case debugging won't help as no PHP is being run.
  2. Moodle returns 404 if a parameter to a PHP script relates to a file or object which doesn't exist (e.g. https://moodle.example.com/theme/styles.php/boost/1602760592/bad_file). But normally debugging doesn't help because there's no bug in the code, if the file doesn't exist then the 404 is the correct outcome.

If you can share the URL that's getting the 404 and a screenshot of the error (hide or remove any information you don't want to share), maybe someone will be able to help with the specific issue.