config-defaults.php 11.8 KB
Newer Older
Penny Leach's avatar
Penny Leach committed
1
2
3
<?php
/**
 * Mahara: Electronic portfolio, weblog, resume builder and social networking
4
5
 * Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
 *                         http://wiki.mahara.org/Contributors
Penny Leach's avatar
Penny Leach committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package    mahara
 * @subpackage core
 * @author     Catalyst IT Ltd
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL
24
 * @copyright  (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
Penny Leach's avatar
Penny Leach committed
25
26
27
 *
 */

28
29
30
31
32
33
34
35
36
37
//
// CONFIGURATION DEFAULTS
//
// Do Not Edit This File!
//
// If you see a setting in here you'd like to change, copy it to your 
// config.php and change it there.
//
// This file sets defaults that are useful for most people.
//
Penny Leach's avatar
Penny Leach committed
38

39
$cfg = new StdClass;
Penny Leach's avatar
Penny Leach committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

// directorypermissions - what permissions to use for files and directories in 
// dataroot. The default allows only the web server user to read the data. If 
// you're on shared hosting and might want to download the contents of your 
// dataroot later (e.g. for backup purposes), set this to 0777. Otherwise, 
// leave it as is!
//$cfg->directorypermissions = 0700;

// insecuredataroot - whether to enforce checking that files being served have 
// come from dataroot. You would only want to turn this on if you were running 
// more than one Mahara against the same dataroot. If you are doing that, make 
// sure you create separate dataroots for each installation, but symlink the 
// artefact directory from all of them to one of them, and turn on 
// 'insecuredataroot' on all the ones you created symlinks for.
//
// If you don't know what you're doing/didn't understand the paragraph above, 
// then leave this setting alone!
//$cfg->insecuredataroot = false;

// system mail address. emails out come from this address.
// if not specified, will default to noreply@ automatically detected host.
// if that doesn't work or you want something else, then specify it here.
62
// $cfg->noreplyaddress = 'noreply@myhost.com';
Penny Leach's avatar
Penny Leach committed
63
64
65

// Logging configuration
// For each log level, you can specify where the messages are displayed.
66
//
Penny Leach's avatar
Penny Leach committed
67
68
// LOG_TARGET_SCREEN makes the error messages go to the screen - useful
// when debugging but not on a live site!
69
70
// LOG_TARGET_ADMIN sends error messages to the screen but only when
// browsing in the admin section
Penny Leach's avatar
Penny Leach committed
71
72
73
// LOG_TARGET_ERRORLOG makes the error messages go to the log as specified
// by the apache ErrorLog directive. It's probably useful to have this on
// for all log levels.
74
75
76
77
78
79
80
81
// LOG_TARGET_FILE allows you to specify a file that messages will be logged
// to. It's best to pick a path in dataroot, but note that logfiles tend to get
// very large over time - so it's advisable to implement some kind of logrotate
// if you want to leave this on all the time. The other option is to just turn
// this on when you are getting some kind of error or want to see the logging,
// and know that you're not going to let the logfile get large.
//
// You can combine the targets with bitwise operations,
Penny Leach's avatar
Penny Leach committed
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// e.g. LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG
//
// This configuration is suitable for people running Mahara for the first
// time. You will immediately see environment errors, and so can correct
// them. You will be able to see other debugging information in your error
// logs. Once your site is up and running you might want to remove the
// environment level logging completely, and just log everything else to
// the error log.
$cfg->log_dbg_targets     = LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
// This configuration is suitable for developers. You will see all errors
// and they will also be in the logs.
//$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
//$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
//$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
//$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

101
// If you use LOG_TARGET_FILE, this is the file that errors will be logged to.
102
103
104
105
// By default, it will write to the file 'error.log' under dataroot. If you
// change this in config.php, make sure you use a folder which is writable by
// the webserver.
// $cfg->log_file = '/path/to/dataroot/error.log';
106

Penny Leach's avatar
Penny Leach committed
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// The log levels that will generate backtraces. Useful for development,
// but probably only warnings are useful on a live site.
$cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;

// Developer mode
// When set, the following things (among others) will happen:
//
// * 'debug.js' will be included on each page. You can edit this file to add 
//   debugging javascript at your discretion
// * 'debug.css' will be included on each page. You can edit this file to add 
//   debugging CSS at your discretion
// * the unpacked version of MochiKit will be used
//
// These options are a performance hit otherwise, enable when you are 
// developing for Mahara
$cfg->developermode = false;
123
// $cfg->developermode = DEVMODE_DEBUGJS | DEVMODE_DEBUGCSS | DEVMODE_UNPACKEDJS;
Penny Leach's avatar
Penny Leach committed
124

125
126
127
128
129
130
131
132
133
134
// Whether to send e-mail. If set to false, Mahara will not send any e-mail at 
// all. This is useful for when setting up development versions of Mahara where 
// you don't want to accidentally send email to users from this particular 
// Mahara installation.
//
// You can use sendallemailto to have all e-mails from this instance of Mahara 
// sent to one particular address instead of where they're aimed for. Leave 
// sendemail = true if you want to use this setting.
$cfg->sendemail = true;
// $cfg->sendallemailto = 'you@example.com';
135
//
136
137
138
// Log basic details of emails sent out by Mahara.  Must be writable by the
// webserver user.  This will get big.
// $cfg->emaillog = '/path/to/dataroot/email.log';
139

Penny Leach's avatar
Penny Leach committed
140
141
142
143
144
// capture performance information and print it
// $cfg->perftofoot = true; // needs a call to mahara_performance_info (smarty callback) - see default theme's footer.tpl
// $cfg->perftolog = true;
// if neither are set, performance info wont be captured.

145
// Mail handling
146
147
// Unless you have a specific reason for having mail settings in the config file,
// please use Configure Site -> Site options -> Email interface.
148
// If you want mahara to use SMTP servers to send mail, enter one or more here
Penny Leach's avatar
Penny Leach committed
149
// blank means mahara will use the default PHP method.
150
151
152
153
154
// $cfg->smtphosts = 'smtp1.example.com;smtp2.example.com';
// If smtp server uses port number different from 25 (e.g. for secure connections,
// port 465 is usually used with ssl, port 587 is usually used with tls),
// specify it below. Alternatively you may specify the port in smtphosts
// definition above using format [hostname:port] (e.g. 'smtp1.example.com:465').
155
// $cfg->smtpport = 25;
156
157
// If you have specified an smtp server above, and the server requires
// authentication, enter user credentials here:
Penny Leach's avatar
Penny Leach committed
158
159
// $cfg->smtpuser = '';
// $cfg->smtppass = '';
160
161
162
163
// If smtp server requres secure connection, specify the protocol type below.
// Valid options are '', 'ssl' or 'tls'. Setting it to '' or leaving the line
// commented means that secure connection will not be used.
// $cfg->smtpsecure = '';
Penny Leach's avatar
Penny Leach committed
164

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// Variable Envelope Return Path Handling
// If you want mahara to keep track of email addresses which generate a
// bounce, set bounces_handle to true.
// If set to true, $cfg->bouncedomain *must* be set.
$cfg->bounces_handle  = false;
// Rather than disable an email address on the first bounce message,
// require bounces_min bounces.
$cfg->bounces_min     = 5;
// Require at least (bounces_ratio*100)% of sent mail to be bounced back
// before disabling mail for that user.
// e.g. If using the default bounces_ratio of 0.20 and 20 mails are sent to
// a user, at least 4 must be returned before email is disabled.
$cfg->bounces_ratio   = 0.20;
// Identity of the Mahara instance
// This prefix must be four characters.
// If you have several Mahara, Moodle, or other VERP processors on the same
// bounce domain, you need to keep track of which processor belongs to
// which domain.
$cfg->bounceprefix    = 'AAA-';
// The domainpart of the generated VERP domain. e.g.
// <localpart>@$cfg->bouncedomain
// This must be set for VERP handling to take effect
//$cfg->bouncedomain    = '';

Penny Leach's avatar
Penny Leach committed
189
190
191
192
// maximum allowed size of uploaded images
// NOTE: the scalable resize might result in images with one dimesion larger than one of these sizes, but not both
$cfg->imagemaxwidth = 1024;
$cfg->imagemaxheight = 1024;
193
194
// Maximum allowed memory usage for thumbnail generation (approximate)
$cfg->maximageresizememory = 104857600;
Penny Leach's avatar
Penny Leach committed
195
196

// paths and arguments for various system commands
197
$cfg->pathtogzip = '/bin/gzip';
Penny Leach's avatar
Penny Leach committed
198
$cfg->pathtounzip = '/usr/bin/unzip';
199
$cfg->pathtozip   = '/usr/bin/zip';
200
$cfg->pathtoaspell = '/usr/bin/aspell';
201
$cfg->ziprecursearg = '-r';
Penny Leach's avatar
Penny Leach committed
202
$cfg->unzipdirarg = '-d';
203
$cfg->unziplistarg = '-l';
204
205
// some shared hosts have restrictions on where unzip can be used
// dataroot is often not allowed; but /tmp is
206
207
208
// Note that if there is more than one mahara on this host using this setting
// you must change this to something unique, eg /tmp/mahara1/ and /tmp/mahara2/
// $cfg->unziptempdir = '/tmp/mahara/';
209
210
211
212
213
214
215

// How often Mahara should update the last access time for users. Setting this 
// lower means the field will be updated more regularly, but means a database 
// write will be required for more requests.
// Setting it to zero means the access time will be updated every request
$cfg->accesstimeupdatefrequency = 300;

216
217
218
219
220
221
// How long since their last request before a user is considered to be logged 
// out. Note that it makes no sense for this to be less than the 
// accesstimeupdatefrequency.
$cfg->accessidletimeout = 600;

// Whether to show the onlineusers sideblock
222
//$cfg->showonlineuserssideblock = true;
223

Francois Marier's avatar
Francois Marier committed
224
// if importing Leap2A over an xmlrpc mnet connection, set this to something higher than 0 to log import information
225
226
// see the constants in import/leap/lib.php
$cfg->leapovermnetloglevel = 0;
227
228
229
230

// base URL of avatar server (with the trailing slash)
// This should normally be set to http://www.gravatar.com/avatar/
//$cfg->remoteavatarbaseurl = 'http://www.gravatar.com/avatar/';
231

232
// Options for width/height of wysiwyg editor in block configuration
233
234
235
236
237
238
// forms.  Workaround for current lack of tinymce fullscreen button.
//
// Make the block config form expand to the full width of browser window
// whenever it contains a tinymce (also increases editor height in
// textbox blocktype):
// $cfg->blockeditormaxwidth = true;
239
240
241
242
//
// Set a fixed height in pixels for the tinymce editor (currently only
// affects the textbox blocktype):
// $cfg->blockeditorheight = 550;
243
244
245

// This needs to be true when forcing https with an ssl proxy such as nginx.
$cfg->sslproxy = false;
246
247
248
249
250
251
252
253
254
255
256
257

// External login page
// Use this config option when you want users to be redirected to another
// login page, for example a moodle instance that has mnet to this mahara
// You can use the following placeholders:
// {wwwroot} - Expands out to the wwwroot of this moodle
// {shorturlencoded} - Expands to the relative script path of the current page (and is urlencoded)
//
// A point to note about the example below. Moodle doesn't strip the trailing slash from wwwroot
// Bug MDL-30042 fixes this, if this patch isn't applied, just hard code the login url you want instead
//
// $cfg->externallogin = 'http://moodle.example.com/auth/mnet/jump.php?hostwwwroot={wwwroot}&wantsurl={shorturlencoded}';