source: trunk/server/www/app/config/core.php.default @ 286

Last change on this file since 286 was 286, checked in by sander, 11 years ago

Add support for the iTools ODF Anonymiser

File size: 11.1 KB
Line 
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 * The administrator E-mail address
229 */
230        Configure::write('Email.admin', 'noreply@officeshots.org');
231/**
232 * Allow anonymous users to submit requests
233 */
234        Configure::write('Auth.allowAnonymous', false);
235/**
236 * Allow new registrations
237 */
238        Configure::write('Auth.allowRegister', true);
239/**
240 * Limit new registrations to certain e-mail addresses
241 * Set to a full path to a txt file containing all valid addresses, or false to allow anyone to register
242 */
243        Configure::write('Auth.limitRegister', false);
244/**
245 * Limit the number of requests for anonymous users
246 */
247        Configure::write('Request.limitAnonymous', 5);
248/**
249 * Limit the number of requests for registered users
250 */
251        Configure::write('Request.limitRegistered', 25);
252/**
253 * Number of seconds until a request expires
254 *
255 * In debug mode we make this four hours so developers do not need to babysit their requests.
256 */
257        if (Configure::read()) {
258                Configure::write('Request.expire', (240 * 60));
259        } else {
260                Configure::write('Request.expire', (30 * 60));
261        }
262/**
263 * The meta refresh time on a results page
264 */
265        Configure::write('Request.meta_refresh', 120);
266/**
267 * Number of seconds that a job remains locked after polling
268 *
269 * In debug mode a job remains locked for only 10 seconds. This way developers do not need to wait 5 minutes
270 * between fixing code and re-polling the job.
271 */
272        if (Configure::read()) {
273                Configure::write('Job.locktime', (10));
274        } else {
275                Configure::write('Job.locktime', (5 * 60));
276        }
277/**
278 * The number of seconds since the last poll of a factory before it is dropped from the front page.
279 *
280 * In debug mode this is significantly longer than normal so that developers do not need to poll all the time
281 * just to have their factory listed.
282 *
283 * In live mode this should be slightly longer than the Job lock timeout
284 */
285        if (Configure::read()) {
286                Configure::write('Factory.polltime', (240 * 60));
287        } else {
288                Configure::write('Factory.polltime', (6 * 60));
289        }
290/**
291 * BeanStalk Configuration
292 * Default settings provided below
293 *
294 * App::import('Core', 'BeanStalk.BeanStalkManager');
295 * BeanStalkManager::config(array(
296 *      'servers' => array(
297 *              '127.0.0.1:11300'
298 *      ),
299 *      'select'                => 'random wait',
300 *      'connection_timeout'    => 0.5,
301 *      'peek_usleep'           => 2500,
302 *      'connection_retries'    => 3,
303 *      'default_tube'          => 'default',
304 *      'auto_unyaml'           => false,
305 * ));
306 */
307        App::import('Core', 'BeanStalk.BeanStalkManager');
308        BeanStalkManager::config(array(
309                'servers' => array(
310                        '127.0.0.1:11300'
311                ),
312                'select'                => 'random wait',
313                'connection_timeout'    => (5 * 60),
314                'peek_usleep'           => 2500,
315                'connection_retries'    => 3,
316                'default_tube'          => 'default',
317                'auto_unyaml'           => false,
318        ));
319/**
320 * Setting for the background worker process
321 */
322        Configure::write('Worker.pidfile', '/var/run/officeshots.pid');
323/**
324 * Configuration for ClamAV scanning. Set to false or to an empty array to disable scanning.
325 */
326        //Configure::write('Clamd', false);
327        Configure::write('Clamd', array(
328                'host'          => 'unix:///var/run/clamav/clamd.ctl',
329                'port'          => 0,
330                'timeout'       => 60
331        ));
332/**
333 * Configuration for the Cyclone3 validator
334 */
335        Configure::write('Validator.Cyclone', '/usr/bin/validate.pl');
336/**
337 * Configuration for the Office-o-tron validator
338 */
339        Configure::write('Validator.Officeotron', 'http://www.probatron.org:8080/officeotron/validator');
340/**
341 * Configuration for the ODFToolkit validator
342 */
343        Configure::write('Validator.ODFToolkit', 'http://tools.odftoolkit.org/odfvalidator/');
344/**
345 * Path to the iTools greeking utility
346 */
347        Configure::write('Anonymiser.path', '/usr/bin/iodf-greek.py');
348?>
Note: See TracBrowser for help on using the repository browser.