Polished.
[moodle.git] / config-dist.php
CommitLineData
076b2292 1<?PHP // $Id$\r
2///////////////////////////////////////////////////////////////////////////\r
3// //\r
4// Moodle configuration file //\r
5// //\r
6// This file should be renamed "config.php" in the top-level directory //\r
7// //\r
8///////////////////////////////////////////////////////////////////////////\r
9// //\r
10// NOTICE OF COPYRIGHT //\r
11// //\r
12// Moodle - Modular Object-Oriented Dynamic Learning Environment //\r
13// http://moodle.com //\r
14// //\r
4e042a3e 15// Copyright (C) 2001-2003 Martin Dougiamas http://dougiamas.com //\r
076b2292 16// //\r
17// This program is free software; you can redistribute it and/or modify //\r
18// it under the terms of the GNU General Public License as published by //\r
19// the Free Software Foundation; either version 2 of the License, or //\r
20// (at your option) any later version. //\r
21// //\r
22// This program is distributed in the hope that it will be useful, //\r
23// but WITHOUT ANY WARRANTY; without even the implied warranty of //\r
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //\r
25// GNU General Public License for more details: //\r
26// //\r
27// http://www.gnu.org/copyleft/gpl.html //\r
28// //\r
29///////////////////////////////////////////////////////////////////////////\r
30\r
3d9f0f81 31unset($CFG); // Ignore this line\r
076b2292 32\r
4e042a3e 33//=========================================================================\r
34// 1. DATABASE SETUP\r
35//=========================================================================\r
076b2292 36// First, you need to configure the database where all Moodle data //\r
37// will be stored. This database must already have been created //\r
4e042a3e 38// and a username/password created to access it. //\r
39// //\r
40// mysql - the prefix is optional, but useful when installing //\r
41// into databases that already contain tables. //\r
704ac9fe 42//\r
4e042a3e 43// postgres7 - the prefix is REQUIRED, regardless of whether the //\r
704ac9fe 44// database already contains tables. //\r
076b2292 45\r
54242af0 46$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)\r
47$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com \r
48$CFG->dbname = 'moodle'; // database name, eg moodle\r
49$CFG->dbuser = 'username'; // your database username\r
50$CFG->dbpass = 'password'; // your database password\r
076b2292 51\r
3d9f0f81 52$CFG->dbpersist = true; // Use persistent database connection? \r
53 // (should be 'true' for 99% of sites)\r
54\r
54242af0 55$CFG->prefix = 'mdl_'; // Prefix to use for all table names\r
9fa49e22 56\r
076b2292 57\r
4e042a3e 58//=========================================================================\r
59// 2. WEB SITE LOCATION\r
60//=========================================================================\r
076b2292 61// Now you need to tell Moodle where it is located. Specify the full\r
704ac9fe 62// web address to where moodle has been installed. If your web site \r
63// is accessible via multiple URLs then choose the most natural one \r
64// that your students would use. Do not include a trailing slash.\r
076b2292 65\r
54242af0 66$CFG->wwwroot = 'http://example.com/moodle';\r
076b2292 67\r
68\r
4e042a3e 69//=========================================================================\r
70// 3. SERVER FILES LOCATION\r
71//=========================================================================\r
076b2292 72// Next, specify the full OS directory path to this same location\r
d8e2e280 73// Make sure the upper/lower case is correct. Some examples:\r
704ac9fe 74//\r
d8e2e280 75// $CFG->dirroot = 'C:\FoxServ\www\moodle'; // Windows\r
76// $CFG->dirroot = '/var/www/html/moodle'; // Redhat Linux\r
076b2292 77\r
d8e2e280 78$CFG->dirroot = '/var/www/html/moodle';\r
076b2292 79\r
80\r
4e042a3e 81//=========================================================================\r
82// 4. DATA FILES LOCATION\r
83//=========================================================================\r
076b2292 84// Now you need a place where Moodle can save uploaded files. This\r
704ac9fe 85// directory should be readable AND WRITEABLE by the web server user \r
86// (usually 'nobody' or 'apache'), but it should not be accessible \r
87// directly via the web.\r
88//\r
4e042a3e 89// - On hosting systems you might need to make sure that your "group" has\r
90// no permissions at all, but that "others" have full permissions.\r
704ac9fe 91//\r
54242af0 92// - On Windows systems you might specify something like 'C:\moodledata'\r
076b2292 93\r
54242af0 94$CFG->dataroot = '/home/moodledata';\r
076b2292 95\r
96\r
4e042a3e 97//=========================================================================\r
be09831a 98// 5. DATA FILES PERMISSIONS\r
99//=========================================================================\r
100// The following parameter sets the permissions of new directories\r
101// created by Moodle within the data directory. The format is in \r
102// octal format (as used by the Unix utility chmod, for example).\r
103// The default is usually OK, but you may want to change it to 0750 \r
104// if you are concerned about world-access to the files (you will need\r
105// to make sure the web server process (eg Apache) can access the files.\r
54242af0 106// NOTE: the prefixed 0 is important, and don't use quotes.\r
be09831a 107\r
108$CFG->directorypermissions = 0777;\r
109\r
110\r
be09831a 111//=========================================================================\r
ae384ef1 112// 6. DIRECTORY LOCATION (most people can just ignore this setting)\r
be09831a 113//=========================================================================\r
114// A very few webhosts use /admin as a special URL for you to access a \r
115// control panel or something. Unfortunately this conflicts with the \r
116// standard location for the Moodle admin pages. You can fix this by \r
117// renaming the admin directory in your installation, and putting that \r
118// new name here. eg "moodleadmin". This will fix admin links in Moodle.\r
119\r
54242af0 120$CFG->admin = 'admin';\r
be09831a 121\r
122\r
4e042a3e 123//=========================================================================\r
aa140aab 124// ALL DONE! To continue your setup, visit your Moodle page with a browser\r
4e042a3e 125//=========================================================================\r
126\r
aa140aab 127require_once("$CFG->dirroot/lib/setup.php"); // Do not change this\r
076b2292 128\r
4e042a3e 129// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, \r
130// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.\r
076b2292 131?>\r