From: moodler Date: Mon, 13 Jan 2003 14:05:29 +0000 (+0000) Subject: More checks to solve support requests before they happen. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d98228e497e8d95ac9ca72bc37152a6bb8e1d3c6;p=moodle.git More checks to solve support requests before they happen. --- diff --git a/admin/index.php b/admin/index.php index b1c80d91b1..c84a261f4a 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,11 +1,18 @@ You need to create a config.php.
+ See the installation instructions."; + die; + } + require_once("../config.php"); /// Check that PHP is of a sufficient version - if ( ! check_php_version("4.1.0") ) { + if (!check_php_version("4.1.0")) { $version = phpversion(); print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)"); die; @@ -25,6 +32,19 @@ error("Moodle has not been configured yet. You need to to edit config.php first."); } + +/// Check settings in config.php + + $dirroot = dirname(realpath("../config.php")); + if ($dirroot != $CFG->dirroot) { + error("Please fix your settings in config.php: +

You have: +

\$CFG->dirroot = \"$CFG->dirroot\"; +

but it should be: +

\$CFG->dirroot = \"$dirroot\";"); + } + + /// Check if the main tables have been installed yet or not. if (! $tables = $db->Metatables() ) { // No tables yet at all.