From d8e2e28044785f9bad72a05177483f6a9ccd1bd3 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 23 May 2003 08:54:36 +0000 Subject: [PATCH] Added a check to make sure CFG->dirroot is correct. --- config-dist.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config-dist.php b/config-dist.php index 29c8565cd1..bb2a221ecf 100644 --- a/config-dist.php +++ b/config-dist.php @@ -70,14 +70,12 @@ $CFG->wwwroot = 'http://example.com/moodle'; // 3. SERVER FILES LOCATION //========================================================================= // Next, specify the full OS directory path to this same location -// For Windows this might be something like this: +// Make sure the upper/lower case is correct. Some examples: // -// $CFG->dirroot = 'C:\Program Files\Easyphp\www\moodle'; -// -// NOTE: Make sure all the upper/lower case is EXACTLY the same as it is -// on your computer otherwise you may experience some problems (bug in PHP) +// $CFG->dirroot = 'C:\FoxServ\www\moodle'; // Windows +// $CFG->dirroot = '/var/www/html/moodle'; // Redhat Linux -$CFG->dirroot = '/web/moodle'; +$CFG->dirroot = '/var/www/html/moodle'; //========================================================================= @@ -110,7 +108,6 @@ $CFG->dataroot = '/home/moodledata'; $CFG->directorypermissions = 0777; - //========================================================================= // 6. DIRECTORY LOCATION (most people can just ignore this setting) //========================================================================= @@ -127,7 +124,12 @@ $CFG->admin = 'admin'; // ALL DONE! To continue your setup, visit your Moodle web page. //========================================================================= -require_once("$CFG->dirroot/lib/setup.php"); // Do not change this +if (! @include_once("$CFG->dirroot/lib/setup.php")) { // Do not change this + echo "

Error detected in config.php

"; + echo "

Error in: \$CFG->dirroot = '$CFG->dirroot';

"; + echo "

Try this: \$CFG->dirroot = '".dirname(__FILE__)."';"; + die; +} // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE. -- 2.39.5