เรียก http://localhost/moodle ฟ้อง
Error detected in configuration file
Your server address can not be: $CFG->wwwroot = 'http://localhost/moodle';
ช่วยที่ค่ะ Code ค่ะ
<?PHP
unset($CFG); // Ignore this line
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'root'; // your database username
$CFG->dbpass = ' '; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
$CFG->dbpersist = false;
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dirroot = '/xampplite/htdocs/moodle';
$CFG->dataroot = '/xampplite/moodledata';
$CFG->directorypermissions = 00777;
$CFG->admin = 'admin';
if ($CFG->wwwroot == 'http://localhost/moodle') {
echo "<p>Error detected in configuration file</p>";
echo "<p>Your server address can not be: \$CFG->wwwroot = 'http://localhost/moodle';</p>";
die;
}
if (file_exists("$CFG->dirroot/lib/setup.php")) { // Do not edit
include_once("$CFG->dirroot/lib/setup.php");
} else {
if ($CFG->dirroot == dirname(__FILE__)) {
echo "<p>Could not find this file: $CFG->dirroot/lib/setup.php</p>";
echo "<p>Are you sure all your files have been uploaded?</p>";
} else {
echo "<p>Error detected in config.php</p>";
echo "<p>Error in: \$CFG->dirroot = '$CFG->dirroot';</p>";
echo "<p>Try this: \$CFG->dirroot = '".dirname(__FILE__)."';</p>";
}
die;
}
?>
web server
- Apache/2.2.12 (Win32) DAV/2 mod_autoindex_color PHP/5.3.0
- MySQL client version: 5.1.37
- PHP extension: mysqli