diff --git a/lib/setup.php b/lib/setup.php index 210bdeef5d2..b6f82c7f9bd 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -147,7 +147,7 @@ if (defined('BEHAT_SITE_RUNNING')) { // Normalise dataroot - we do not want any symbolic links, trailing / or any other weirdness there if (!isset($CFG->dataroot)) { if (isset($_SERVER['REMOTE_ADDR'])) { - header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); + header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error '); } echo('Fatal error: $CFG->dataroot is not specified in config.php! Exiting.'."\n"); exit(1); @@ -155,13 +155,13 @@ if (!isset($CFG->dataroot)) { $CFG->dataroot = realpath($CFG->dataroot); if ($CFG->dataroot === false) { if (isset($_SERVER['REMOTE_ADDR'])) { - header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); + header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error '); } echo('Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.'."\n"); exit(1); } else if (!is_writable($CFG->dataroot)) { if (isset($_SERVER['REMOTE_ADDR'])) { - header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); + header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error '); } echo('Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting.'."\n"); exit(1); @@ -170,7 +170,7 @@ if ($CFG->dataroot === false) { // wwwroot is mandatory if (!isset($CFG->wwwroot) or $CFG->wwwroot === 'http://example.com/moodle') { if (isset($_SERVER['REMOTE_ADDR'])) { - header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); + header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error '); } echo('Fatal error: $CFG->wwwroot is not configured! Exiting.'."\n"); exit(1); diff --git a/lib/setuplib.php b/lib/setuplib.php index 9dd220ffa51..da146429b41 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -2047,7 +2047,7 @@ class bootstrap_renderer { // In the name of protocol correctness, monitoring and performance // profiling, set the appropriate error headers for machine consumption. $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'); - @header($protocol . ' 503 Service Unavailable'); + @header($protocol . ' 500 Internal Server Error'); // better disable any caching @header('Content-Type: text/html; charset=utf-8');