Merge branch 'MDL-71012-311' of https://github.com/jessansell/moodle into MOODLE_311_STABLE
This commit is contained in:
+4
-4
@@ -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);
|
||||
|
||||
+1
-1
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user