1 | <?php |
---|
2 | /* SVN FILE: $Id: core.php 7945 2008-12-19 02:16:01Z gwoo $ */ |
---|
3 | /** |
---|
4 | * This is core configuration file. |
---|
5 | * |
---|
6 | * Use it to configure core behavior of Cake. |
---|
7 | * |
---|
8 | * PHP versions 4 and 5 |
---|
9 | * |
---|
10 | * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) |
---|
11 | * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) |
---|
12 | * |
---|
13 | * Licensed under The MIT License |
---|
14 | * Redistributions of files must retain the above copyright notice. |
---|
15 | * |
---|
16 | * @filesource |
---|
17 | * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) |
---|
18 | * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project |
---|
19 | * @package cake |
---|
20 | * @subpackage cake.app.config |
---|
21 | * @since CakePHP(tm) v 0.2.9 |
---|
22 | * @version $Revision: 7945 $ |
---|
23 | * @modifiedby $LastChangedBy: gwoo $ |
---|
24 | * @lastmodified $Date: 2008-12-18 20:16:01 -0600 (Thu, 18 Dec 2008) $ |
---|
25 | * @license http://www.opensource.org/licenses/mit-license.php The MIT License |
---|
26 | */ |
---|
27 | /** |
---|
28 | * CakePHP Debug Level: |
---|
29 | * |
---|
30 | * Production Mode: |
---|
31 | * 0: No error messages, errors, or warnings shown. Flash messages redirect. |
---|
32 | * |
---|
33 | * Development Mode: |
---|
34 | * 1: Errors and warnings shown, model caches refreshed, flash messages halted. |
---|
35 | * 2: As in 1, but also with full debug messages and SQL output. |
---|
36 | * 3: As in 2, but also with full controller dump. |
---|
37 | * |
---|
38 | * In production mode, flash messages redirect after a time interval. |
---|
39 | * In development mode, you need to click the flash message to continue. |
---|
40 | */ |
---|
41 | Configure::write('debug', 2); |
---|
42 | /** |
---|
43 | * Application wide charset encoding |
---|
44 | */ |
---|
45 | Configure::write('App.encoding', 'UTF-8'); |
---|
46 | /** |
---|
47 | * To configure CakePHP *not* to use mod_rewrite and to |
---|
48 | * use CakePHP pretty URLs, remove these .htaccess |
---|
49 | * files: |
---|
50 | * |
---|
51 | * /.htaccess |
---|
52 | * /app/.htaccess |
---|
53 | * /app/webroot/.htaccess |
---|
54 | * |
---|
55 | * And uncomment the App.baseUrl below: |
---|
56 | */ |
---|
57 | //Configure::write('App.baseUrl', env('SCRIPT_NAME')); |
---|
58 | /** |
---|
59 | * Uncomment the define below to use CakePHP admin routes. |
---|
60 | * |
---|
61 | * The value of the define determines the name of the route |
---|
62 | * and its associated controller actions: |
---|
63 | * |
---|
64 | * 'admin' -> admin_index() and /admin/controller/index |
---|
65 | * 'superuser' -> superuser_index() and /superuser/controller/index |
---|
66 | */ |
---|
67 | Configure::write('Routing.admin', 'admin'); |
---|
68 | |
---|
69 | /** |
---|
70 | * Turn off all caching application-wide. |
---|
71 | * |
---|
72 | */ |
---|
73 | //Configure::write('Cache.disable', true); |
---|
74 | /** |
---|
75 | * Enable cache checking. |
---|
76 | * |
---|
77 | * If set to true, for view caching you must still use the controller |
---|
78 | * var $cacheAction inside your controllers to define caching settings. |
---|
79 | * You can either set it controller-wide by setting var $cacheAction = true, |
---|
80 | * or in each action using $this->cacheAction = true. |
---|
81 | * |
---|
82 | */ |
---|
83 | //Configure::write('Cache.check', true); |
---|
84 | /** |
---|
85 | * Defines the default error type when using the log() function. Used for |
---|
86 | * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. |
---|
87 | */ |
---|
88 | define('LOG_ERROR', 2); |
---|
89 | /** |
---|
90 | * The preferred session handling method. Valid values: |
---|
91 | * |
---|
92 | * 'php' Uses settings defined in your php.ini. |
---|
93 | * 'cake' Saves session files in CakePHP's /tmp directory. |
---|
94 | * 'database' Uses CakePHP's database sessions. |
---|
95 | * |
---|
96 | * To define a custom session handler, save it at /app/config/<name>.php. |
---|
97 | * Set the value of 'Session.save' to <name> to utilize it in CakePHP. |
---|
98 | * |
---|
99 | * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql. |
---|
100 | * |
---|
101 | */ |
---|
102 | Configure::write('Session.save', 'php'); |
---|
103 | /** |
---|
104 | * The name of the table used to store CakePHP database sessions. |
---|
105 | * |
---|
106 | * 'Session.save' must be set to 'database' in order to utilize this constant. |
---|
107 | * |
---|
108 | * The table name set here should *not* include any table prefix defined elsewhere. |
---|
109 | */ |
---|
110 | //Configure::write('Session.table', 'cake_sessions'); |
---|
111 | /** |
---|
112 | * The DATABASE_CONFIG::$var to use for database session handling. |
---|
113 | * |
---|
114 | * 'Session.save' must be set to 'database' in order to utilize this constant. |
---|
115 | */ |
---|
116 | //Configure::write('Session.database', 'default'); |
---|
117 | /** |
---|
118 | * The name of CakePHP's session cookie. |
---|
119 | */ |
---|
120 | Configure::write('Session.cookie', 'CAKEPHP'); |
---|
121 | /** |
---|
122 | * Session time out time (in seconds). |
---|
123 | * Actual value depends on 'Security.level' setting. |
---|
124 | */ |
---|
125 | Configure::write('Session.timeout', '120'); |
---|
126 | /** |
---|
127 | * If set to false, sessions are not automatically started. |
---|
128 | */ |
---|
129 | Configure::write('Session.start', true); |
---|
130 | /** |
---|
131 | * When set to false, HTTP_USER_AGENT will not be checked |
---|
132 | * in the session |
---|
133 | */ |
---|
134 | Configure::write('Session.checkAgent', true); |
---|
135 | /** |
---|
136 | * The level of CakePHP security. The session timeout time defined |
---|
137 | * in 'Session.timeout' is multiplied according to the settings here. |
---|
138 | * Valid values: |
---|
139 | * |
---|
140 | * 'high' Session timeout in 'Session.timeout' x 10 |
---|
141 | * 'medium' Session timeout in 'Session.timeout' x 100 |
---|
142 | * 'low' Session timeout in 'Session.timeout' x 300 |
---|
143 | * |
---|
144 | * CakePHP session IDs are also regenerated between requests if |
---|
145 | * 'Security.level' is set to 'high'. |
---|
146 | */ |
---|
147 | Configure::write('Security.level', 'medium'); |
---|
148 | /** |
---|
149 | * A random string used in security hashing methods. |
---|
150 | */ |
---|
151 | Configure::write('Security.salt', 'LiefKleinKonijntjeHeeftEenVliegjeOpZijnNeus'); |
---|
152 | /** |
---|
153 | * Compress CSS output by removing comments, whitespace, repeating tags, etc. |
---|
154 | * This requires a/var/cache directory to be writable by the web server for caching. |
---|
155 | * and /vendors/csspp/csspp.php |
---|
156 | * |
---|
157 | * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css(). |
---|
158 | */ |
---|
159 | //Configure::write('Asset.filter.css', 'css.php'); |
---|
160 | /** |
---|
161 | * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the |
---|
162 | * output, and setting the config below to the name of the script. |
---|
163 | * |
---|
164 | * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link(). |
---|
165 | */ |
---|
166 | //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); |
---|
167 | /** |
---|
168 | * The classname and database used in CakePHP's |
---|
169 | * access control lists. |
---|
170 | */ |
---|
171 | Configure::write('Acl.classname', 'DbAcl'); |
---|
172 | Configure::write('Acl.database', 'default'); |
---|
173 | /** |
---|
174 | * |
---|
175 | * Cache Engine Configuration |
---|
176 | * Default settings provided below |
---|
177 | * |
---|
178 | * File storage engine. |
---|
179 | * |
---|
180 | * Cache::config('default', array( |
---|
181 | * 'engine' => 'File', //[required] |
---|
182 | * 'duration'=> 3600, //[optional] |
---|
183 | * 'probability'=> 100, //[optional] |
---|
184 | * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path |
---|
185 | * 'prefix' => 'cake_', //[optional] prefix every cache file with this string |
---|
186 | * 'lock' => false, //[optional] use file locking |
---|
187 | * 'serialize' => true, [optional] |
---|
188 | * )); |
---|
189 | * |
---|
190 | * |
---|
191 | * APC (http://pecl.php.net/package/APC) |
---|
192 | * |
---|
193 | * Cache::config('default', array( |
---|
194 | * 'engine' => 'Apc', //[required] |
---|
195 | * 'duration'=> 3600, //[optional] |
---|
196 | * 'probability'=> 100, //[optional] |
---|
197 | * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string |
---|
198 | * )); |
---|
199 | * |
---|
200 | * Xcache (http://xcache.lighttpd.net/) |
---|
201 | * |
---|
202 | * Cache::config('default', array( |
---|
203 | * 'engine' => 'Xcache', //[required] |
---|
204 | * 'duration'=> 3600, //[optional] |
---|
205 | * 'probability'=> 100, //[optional] |
---|
206 | * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string |
---|
207 | * 'user' => 'user', //user from xcache.admin.user settings |
---|
208 | * 'password' => 'password', //plaintext password (xcache.admin.pass) |
---|
209 | * )); |
---|
210 | * |
---|
211 | * |
---|
212 | * Memcache (http://www.danga.com/memcached/) |
---|
213 | * |
---|
214 | * Cache::config('default', array( |
---|
215 | * 'engine' => 'Memcache', //[required] |
---|
216 | * 'duration'=> 3600, //[optional] |
---|
217 | * 'probability'=> 100, //[optional] |
---|
218 | * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string |
---|
219 | * 'servers' => array( |
---|
220 | * '127.0.0.1:11211' // localhost, default port 11211 |
---|
221 | * ), //[optional] |
---|
222 | * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) |
---|
223 | * )); |
---|
224 | * |
---|
225 | */ |
---|
226 | Cache::config('default', array('engine' => 'File')); |
---|
227 | /** |
---|
228 | * Set the default language |
---|
229 | */ |
---|
230 | Configure::write('Config.language', 'eng'); |
---|
231 | /** |
---|
232 | * The administrator E-mail address |
---|
233 | */ |
---|
234 | Configure::write('Email.admin', 'noreply@officeshots.org'); |
---|
235 | /** |
---|
236 | * Allow anonymous users to submit requests |
---|
237 | */ |
---|
238 | Configure::write('Auth.allowAnonymous', false); |
---|
239 | /** |
---|
240 | * Allow new registrations |
---|
241 | */ |
---|
242 | Configure::write('Auth.allowRegister', true); |
---|
243 | /** |
---|
244 | * Limit new registrations to certain e-mail addresses |
---|
245 | * Set to a full path to a txt file containing all valid addresses, or false to allow anyone to register |
---|
246 | */ |
---|
247 | Configure::write('Auth.limitRegister', false); |
---|
248 | /** |
---|
249 | * Limit the number of requests for anonymous users |
---|
250 | */ |
---|
251 | Configure::write('Request.limitAnonymous', 5); |
---|
252 | /** |
---|
253 | * Limit the number of requests for registered users |
---|
254 | */ |
---|
255 | Configure::write('Request.limitRegistered', 25); |
---|
256 | /** |
---|
257 | * Number of seconds until a request expires |
---|
258 | * |
---|
259 | * In debug mode we make this four hours so developers do not need to babysit their requests. |
---|
260 | */ |
---|
261 | if (Configure::read()) { |
---|
262 | Configure::write('Request.expire', (240 * 60)); |
---|
263 | } else { |
---|
264 | Configure::write('Request.expire', (30 * 60)); |
---|
265 | } |
---|
266 | /** |
---|
267 | * The meta refresh time on a results page |
---|
268 | */ |
---|
269 | Configure::write('Request.meta_refresh', 120); |
---|
270 | /** |
---|
271 | * Number of seconds that a job remains locked after polling |
---|
272 | * |
---|
273 | * In debug mode a job remains locked for only 10 seconds. This way developers do not need to wait 5 minutes |
---|
274 | * between fixing code and re-polling the job. |
---|
275 | */ |
---|
276 | if (Configure::read()) { |
---|
277 | Configure::write('Job.locktime', (10)); |
---|
278 | } else { |
---|
279 | Configure::write('Job.locktime', (5 * 60)); |
---|
280 | } |
---|
281 | /** |
---|
282 | * The number of seconds since the last poll of a factory before it is dropped from the front page. |
---|
283 | * |
---|
284 | * In debug mode this is significantly longer than normal so that developers do not need to poll all the time |
---|
285 | * just to have their factory listed. |
---|
286 | * |
---|
287 | * In live mode this should be slightly longer than the Job lock timeout |
---|
288 | */ |
---|
289 | if (Configure::read()) { |
---|
290 | Configure::write('Factory.polltime', (240 * 60)); |
---|
291 | } else { |
---|
292 | Configure::write('Factory.polltime', (6 * 60)); |
---|
293 | } |
---|
294 | /** |
---|
295 | * The number of seconds a factory must be running uninterrupted before it is considered "stable". Testsuite jobs will only be |
---|
296 | * generated for stable factories. This way experimetal, development or unstable factories will not be overloaded with hundreds |
---|
297 | * of jobs. |
---|
298 | */ |
---|
299 | Configure::write('Factory.stabletime', (60 * 60 * 24)); |
---|
300 | /** |
---|
301 | * BeanStalk Configuration |
---|
302 | * Default settings provided below |
---|
303 | * |
---|
304 | * App::import('Core', 'BeanStalk.BeanStalkManager'); |
---|
305 | * BeanStalkManager::config(array( |
---|
306 | * 'servers' => array( |
---|
307 | * '127.0.0.1:11300' |
---|
308 | * ), |
---|
309 | * 'select' => 'random wait', |
---|
310 | * 'connection_timeout' => 0.5, |
---|
311 | * 'peek_usleep' => 2500, |
---|
312 | * 'connection_retries' => 3, |
---|
313 | * 'default_tube' => 'default', |
---|
314 | * 'auto_unyaml' => false, |
---|
315 | * )); |
---|
316 | */ |
---|
317 | App::import('Core', 'BeanStalk.BeanStalkManager'); |
---|
318 | BeanStalkManager::config(array( |
---|
319 | 'servers' => array( |
---|
320 | '127.0.0.1:11300' |
---|
321 | ), |
---|
322 | 'select' => 'random wait', |
---|
323 | 'connection_timeout' => (5 * 60), |
---|
324 | 'peek_usleep' => 2500, |
---|
325 | 'connection_retries' => 3, |
---|
326 | 'default_tube' => 'default', |
---|
327 | 'auto_unyaml' => false, |
---|
328 | )); |
---|
329 | /** |
---|
330 | * Setting for the background worker process |
---|
331 | */ |
---|
332 | Configure::write('Worker.pidfile', '/var/run/officeshots.pid'); |
---|
333 | /** |
---|
334 | * Configuration for ClamAV scanning. Set to false or to an empty array to disable scanning. |
---|
335 | */ |
---|
336 | //Configure::write('Clamd', false); |
---|
337 | Configure::write('Clamd', array( |
---|
338 | 'host' => 'unix:///var/run/clamav/clamd.ctl', |
---|
339 | 'port' => 0, |
---|
340 | 'timeout' => 60 |
---|
341 | )); |
---|
342 | /** |
---|
343 | * Configuration for the Cyclone3 validator |
---|
344 | */ |
---|
345 | Configure::write('Validator.Cyclone', '/usr/bin/validate.pl'); |
---|
346 | /** |
---|
347 | * Configuration for the Office-o-tron validator |
---|
348 | */ |
---|
349 | Configure::write('Validator.Officeotron', 'http://www.probatron.org:8080/officeotron/validator'); |
---|
350 | /** |
---|
351 | * Configuration for the ODFToolkit validator |
---|
352 | */ |
---|
353 | Configure::write('Validator.ODFToolkit', 'http://tools.odftoolkit.org/odfvalidator/'); |
---|
354 | /** |
---|
355 | * Path to the iTools greeking utility |
---|
356 | */ |
---|
357 | Configure::write('Anonymiser.path', '/usr/bin/iodf-greek.py'); |
---|
358 | /** |
---|
359 | * Testsuite uid/gid settings |
---|
360 | */ |
---|
361 | Configure::write('Testsuite.user_id', ''); |
---|
362 | Configure::write('Testsuite.group_id', ''); |
---|
363 | ?> |
---|