Closing sessions may fix some problems on WIndows/CGI systems ...
[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
31\r
4e042a3e 32//=========================================================================\r
33// 1. DATABASE SETUP\r
34//=========================================================================\r
076b2292 35// First, you need to configure the database where all Moodle data //\r
36// will be stored. This database must already have been created //\r
4e042a3e 37// and a username/password created to access it. //\r
38// //\r
39// mysql - the prefix is optional, but useful when installing //\r
40// into databases that already contain tables. //\r
41// postgres7 - the prefix is REQUIRED, regardless of whether the //\r
42// database is empty of not. //\r
076b2292 43\r
4e042a3e 44$CFG->dbtype = "mysql"; // mysql or postgres7 (for now)\r
45$CFG->dbhost = "localhost"; // eg localhost or db.isp.com \r
46$CFG->dbname = "moodle"; // database name, eg moodle\r
47$CFG->dbuser = "username"; // your database username\r
48$CFG->dbpass = "password"; // your database password\r
076b2292 49\r
4e042a3e 50$CFG->prefix = "mdl_"; // Prefix to use for all table names\r
9fa49e22 51\r
076b2292 52\r
4e042a3e 53//=========================================================================\r
54// 2. WEB SITE LOCATION\r
55//=========================================================================\r
076b2292 56// Now you need to tell Moodle where it is located. Specify the full\r
57// web address where moodle has been installed (without trailing slash)\r
58\r
59$CFG->wwwroot = "http://example.com/moodle";\r
60\r
61\r
4e042a3e 62//=========================================================================\r
63// 3. SERVER FILES LOCATION\r
64//=========================================================================\r
076b2292 65// Next, specify the full OS directory path to this same location\r
66// For Windows this might be something like "C:\apache\htdocs\moodle"\r
67\r
68$CFG->dirroot = "/web/moodle";\r
69\r
70\r
4e042a3e 71//=========================================================================\r
72// 4. DATA FILES LOCATION\r
73//=========================================================================\r
076b2292 74// Now you need a place where Moodle can save uploaded files. This\r
75// directory should be writeable by the web server user (usually 'nobody'\r
76// or 'apache'), but it should not be accessible directly via the web.\r
4e042a3e 77// - On hosting systems you might need to make sure that your "group" has\r
78// no permissions at all, but that "others" have full permissions.\r
79// - On Windows systems you might specify something like "C:\moodledata"\r
076b2292 80\r
81$CFG->dataroot = "/home/moodledata";\r
82\r
83\r
4e042a3e 84//=========================================================================\r
85// 5. TROUBLESHOOTING (most people can just ignore this setting)\r
86//=========================================================================\r
076b2292 87// A very small percentage of servers have a bug which causes HTTP_REFERER\r
88// not to work. The symptoms of this are that you fill out the configure\r
89// form during Moodle setup but when hit save you find yourself on the \r
90// same form, unable to progress. If this happens to you, come back here\r
91// and set the following to true. Otherwise this should always be false.\r
92\r
93$CFG->buggy_referer = false;\r
94\r
95\r
4e042a3e 96//=========================================================================\r
97// 6. ALL DONE! To continue your setup, visit your Moodle web page.\r
98//=========================================================================\r
99\r
076b2292 100\r
101$CFG->libdir = "$CFG->dirroot/lib"; // Do not change this\r
b0e3a925 102require_once("$CFG->libdir/setup.php"); // Do not change this\r
076b2292 103\r
4e042a3e 104// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, \r
105// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.\r
076b2292 106?>\r