Added ability to define proxy machine (eg a firewall) so that Moodle
[moodle.git] / config-dist.php
blob7576e74fe286d3ab882a94000a14770a822e18af
1 <?PHP // $Id$
2 ///////////////////////////////////////////////////////////////////////////
3 //
4 // Moodle configuration file
5 //
6 // This file should be located in the top-level directory.
7 //
8 ///////////////////////////////////////////////////////////////////////////
9 //
10 // NOTICE OF COPYRIGHT
12 // Moodle - Modular Object-Oriented Dynamic Learning Environment
13 // http://moodle.com
14 //
15 // Copyright (C) 2001 Martin Dougiamas http://dougiamas.com
17 // This program is free software; you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation; either version 2 of the License, or
20 // (at your option) any later version.
21 //
22 // This program is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 // GNU General Public License for more details:
26 //
27 // http://www.gnu.org/copyleft/gpl.html
28 //
29 ////////////////////////////////////////////////////////////////////////////
31 // Site configuration variables are all stored in the CFG object.
33 // First, you need to configure the database where all Moodle data
34 // will be stored. This database must already have been created
35 // and a username/password created to access it. See doc/INSTALL.
37 $CFG->dbtype = "mysql"; // eg mysql (postgres7, oracle, access etc coming soon)
38 $CFG->dbhost = "localhost"; // eg localhost
39 $CFG->dbname = "moodle"; // eg moodle
40 $CFG->dbuser = "username";
41 $CFG->dbpass = "password";
44 // Next you need to tell Moodle where it is located.
45 // Specify the full URL that moodle has been installed in:
47 $CFG->wwwroot = "http://example.com/moodle";
50 // and now the full OS directory path to this same location:
52 $CFG->dirroot = "/web/moodle";
55 // Now you need a place where Moodle can save uploaded files. This directory
56 // should be writeable by the web server user (usually 'nobody' or 'apache'),
57 // but it should not be accessible directly via the web.
59 $CFG->dataroot = "/home/moodledata";
62 // Choose a sitewide language - this will affect text, buttons etc
63 // See lib/languages.php for a full list of standard language codes.
65 $CFG->lang = "en"; // Currently the only option
68 // Choose a sitewide locale - this will affect the display of dates
69 // You need to have this locale data installed on your operating
70 // system. If you don't know what to choose try using the same
71 // string as the language.
73 $CFG->locale = "en";
76 // Give the full names of local SMTP servers that Moodle should use to
77 // send mail (eg "mail.a.com" or "mail.a.com;mail.b.com").
78 // If this is left empty (eg "") then Moodle will attempt to use PHP mail.
80 $CFG->smtphosts = "";
83 // There is no way, currently, for PHP to automatically tell whether the
84 // graphic library GD is version 1.* or 2.*. Specify here (either 1 or 2).
86 $CFG->gdversion = 1;
89 // If students haven't logged in for a very long time, then they are
90 // automatically unsubscribed from courses. This parameter specifies
91 // that time limit, in DAYS.
93 $CFG->longtimenosee = 100;
96 // These programs are used by the file management code to zip and unzip
97 // uploaded files. This only works on Unix systems right now.
99 $CFG->zip = "/usr/bin/zip";
100 $CFG->unzip = "/usr/bin/unzip";
103 // Files (images, uploads etc) are provided via a script which
104 // is called like this example: file.php/1/myfiles/mymusic.mp3
105 // Using this form of argument allows files to be more easily
106 // cached in web browsers, proxy servers etc, but they don't
107 // work in all PHP servers. If you have trouble viewing
108 // uploaded files or images, then set the following to false
110 $CFG->slasharguments = true;
112 // If this server needs to use a proxy computer (eg a firewall)
113 // to access the Internet, then provide the proxy details here.
114 // This will only affect a few minor features such as the ability
115 // to see user locations plotted on a graph.
116 // Otherwise, leave these blank
118 $CFG->proxyhost = "";
119 $CFG->proxyport = "";
122 // You should not need to change anything else. To continue setting up
123 // Moodle, use your web browser to go to the moodle/admin web page.
124 ///////////////////////////////////////////////////////////////////////////
126 $CFG->libdir = "$CFG->dirroot/lib";
128 require("$CFG->libdir/setup.php"); // Sets up all libraries, sessions etc