]> git.mjollnir.org Git - moodle.git/commitdiff
Added a check to make sure CFG->dirroot is correct.
authormoodler <moodler>
Fri, 23 May 2003 08:54:36 +0000 (08:54 +0000)
committermoodler <moodler>
Fri, 23 May 2003 08:54:36 +0000 (08:54 +0000)
config-dist.php

index 29c8565cd129850073db48c548590ad88a471541..bb2a221ecf795271b29767cb630db484074b171e 100644 (file)
@@ -70,14 +70,12 @@ $CFG->wwwroot   = 'http://example.com/moodle';
 // 3. SERVER FILES LOCATION\r
 //=========================================================================\r
 // Next, specify the full OS directory path to this same location\r
-// For Windows this might be something like this:\r
+// Make sure the upper/lower case is correct.  Some examples:\r
 //\r
-//    $CFG->dirroot = 'C:\Program Files\Easyphp\www\moodle';\r
-//\r
-// NOTE: Make sure all the upper/lower case is EXACTLY the same as it is \r
-// on your computer otherwise you may experience some problems (bug in PHP)\r
+//    $CFG->dirroot = 'C:\FoxServ\www\moodle';    // Windows\r
+//    $CFG->dirroot = '/var/www/html/moodle';     // Redhat Linux\r
 \r
-$CFG->dirroot   = '/web/moodle';\r
+$CFG->dirroot   = '/var/www/html/moodle';\r
 \r
 \r
 //=========================================================================\r
@@ -110,7 +108,6 @@ $CFG->dataroot  = '/home/moodledata';
 $CFG->directorypermissions = 0777;\r
 \r
 \r
-\r
 //=========================================================================\r
 // 6. DIRECTORY LOCATION  (most people can just ignore this setting)\r
 //=========================================================================\r
@@ -127,7 +124,12 @@ $CFG->admin = 'admin';
 // ALL DONE!  To continue your setup, visit your Moodle web page.\r
 //=========================================================================\r
 \r
-require_once("$CFG->dirroot/lib/setup.php");       // Do not change this\r
+if (! @include_once("$CFG->dirroot/lib/setup.php"))  {    // Do not change this\r
+    echo "<p>Error detected in config.php</p>";\r
+    echo "<p>Error in: \$CFG->dirroot = '$CFG->dirroot';</p>";\r
+    echo "<p>Try this: \$CFG->dirroot = '".dirname(__FILE__)."';";\r
+    die;\r
+}\r
 \r
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, \r
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.\r