Error message for restricted users
[moodle.git] / config-dist.php
CommitLineData
e6ce0cb9 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
15// Copyright (C) 2001-2003 Martin Dougiamas http://dougiamas.com //\r
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
30unset($CFG); // Ignore this line\r
31\r
32//=========================================================================\r
33// 1. DATABASE SETUP\r
34//=========================================================================\r
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
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//\r
42// postgres7 - the prefix is REQUIRED, regardless of whether the //\r
43// database already contains tables. //\r
44// //\r
45// A special case exists when using PostgreSQL databases via sockets. //\r
46// Define dbhost as follows, leaving dbname, dbuser, dbpass BLANK!: //\r
47// $CFG->dbhost = " user='muser' password='mpass' dbname='mdata'"; //\r
48// \r
49\r
50$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)\r
51$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com \r
52$CFG->dbname = 'moodle'; // database name, eg moodle\r
53$CFG->dbuser = 'username'; // your database username\r
54$CFG->dbpass = 'password'; // your database password\r
55$CFG->dbpersist = true; // Use persistent database connection? \r
56 // (should be 'true' for 99% of sites)\r
57$CFG->prefix = 'mdl_'; // Prefix to use for all table names\r
58\r
59\r
60//=========================================================================\r
61// 2. WEB SITE LOCATION\r
62//=========================================================================\r
63// Now you need to tell Moodle where it is located. Specify the full\r
64// web address to where moodle has been installed. If your web site \r
65// is accessible via multiple URLs then choose the most natural one \r
66// that your students would use. Do not include a trailing slash.\r
67\r
68$CFG->wwwroot = 'http://example.com/moodle';\r
69\r
70\r
71//=========================================================================\r
72// 3. SERVER FILES LOCATION\r
73//=========================================================================\r
74// Next, specify the full OS directory path to this same location\r
75// Make sure the upper/lower case is correct. Some examples:\r
76//\r
77// $CFG->dirroot = 'c:\FoxServ\www\moodle'; // Windows\r
78// $CFG->dirroot = '/var/www/html/moodle'; // Redhat Linux\r
79// $CFG->dirroot = '/home/example/www/moodle'; // Cpanel host\r
80\r
81$CFG->dirroot = '/home/example/www/moodle';\r
82\r
83\r
84//=========================================================================\r
85// 4. DATA FILES LOCATION\r
86//=========================================================================\r
87// Now you need a place where Moodle can save uploaded files. This\r
88// directory should be readable AND WRITEABLE by the web server user \r
89// (usually 'nobody' or 'apache'), but it should not be accessible \r
90// directly via the web.\r
91//\r
92// - On hosting systems you might need to make sure that your "group" has\r
93// no permissions at all, but that "others" have full permissions.\r
94//\r
95// - On Windows systems you might specify something like 'c:\moodledata'\r
96\r
97$CFG->dataroot = '/home/example/moodledata';\r
98\r
99\r
100//=========================================================================\r
101// 5. DATA FILES PERMISSIONS\r
102//=========================================================================\r
103// The following parameter sets the permissions of new directories\r
104// created by Moodle within the data directory. The format is in \r
105// octal format (as used by the Unix utility chmod, for example).\r
106// The default is usually OK, but you may want to change it to 0750 \r
107// if you are concerned about world-access to the files (you will need\r
108// to make sure the web server process (eg Apache) can access the files.\r
109// NOTE: the prefixed 0 is important, and don't use quotes.\r
110\r
111$CFG->directorypermissions = 0777;\r
112\r
113\r
114//=========================================================================\r
115// 6. DIRECTORY LOCATION (most people can just ignore this setting)\r
116//=========================================================================\r
117// A very few webhosts use /admin as a special URL for you to access a \r
118// control panel or something. Unfortunately this conflicts with the \r
119// standard location for the Moodle admin pages. You can fix this by \r
120// renaming the admin directory in your installation, and putting that \r
121// new name here. eg "moodleadmin". This will fix admin links in Moodle.\r
122\r
123$CFG->admin = 'admin';\r
124\r
125\r
126//=========================================================================\r
127// 7. TEXT FILTERS (most people can just ignore this setting)\r
128//=========================================================================\r
129// This is a new and experimental feature that allows text filters to \r
130// be used on all printed texts in Moodle. To add text filters, you\r
131// need to specify the path to a file that contains a standard textfilter.\r
132// The numbers need to start at one and increment up to ten.\r
133// \r
134// eg $CFG->textfilter1 = "mod/glossary/dynalink.php";\r
135// $CFG->textfilter2 = "library/librarylib.php";\r
136\r
137\r
138//=========================================================================\r
139// ALL DONE! To continue installation, visit your main page with a browser\r
140//=========================================================================\r
141if (file_exists("$CFG->dirroot/lib/setup.php")) { // Do not edit\r
142 include_once("$CFG->dirroot/lib/setup.php");\r
143} else {\r
144 if ($CFG->dirroot == dirname(__FILE__)) {\r
145 echo "<p>Could not find this file: $CFG->dirroot/lib/setup.php</p>";\r
146 echo "<p>Are you sure all your files have been uploaded?</p>";\r
147 } else {\r
148 echo "<p>Error detected in config.php</p>";\r
149 echo "<p>Error in: \$CFG->dirroot = '$CFG->dirroot';</p>";\r
150 echo "<p>Try this: \$CFG->dirroot = '".dirname(__FILE__)."';</p>";\r
151 }\r
152 die;\r
153}\r
154// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, \r
155// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.\r
156?>\r