~tsep-dev/tsep/0.9-beta

« back to all changes in this revision

Viewing changes to branches/symfony/app/config/core.php

  • Committer: geoffreyfishing
  • Date: 2011-01-11 23:46:12 UTC
  • Revision ID: svn-v4:ae0de26e-ed09-4cbe-9a20-e40b4c60ac6c::125
Created a symfony branch for future migration to symfony

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
* The core configuration for this application
 
4
 
5
* @author Geoffrey
 
6
*
 
7
* The following will be filled automatically by SubVersion!
 
8
* Do not change by hand!
 
9
*  $LastChangedDate: $
 
10
*  $LastChangedBy:  $
 
11
*  $LastChangedRevision: $
 
12
*
 
13
*/
 
14
/**
 
15
 * This is core configuration file.
 
16
 *
 
17
 * Use it to configure core behavior of Cake.
 
18
 *
 
19
 * PHP versions 4 and 5
 
20
 *
 
21
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 
22
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
23
 *
 
24
 * Licensed under The MIT License
 
25
 * Redistributions of files must retain the above copyright notice.
 
26
 *
 
27
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
28
 * @link          http://cakephp.org CakePHP(tm) Project
 
29
 * @package       cake
 
30
 * @subpackage    cake.app.config
 
31
 * @since         CakePHP(tm) v 0.2.9
 
32
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 
33
 */
 
34
 
 
35
Configure::write('Configuration.ini', @parse_ini_file(CONFIGS.'settings.ini.php', true));
 
36
 
 
37
Configure::write('Configuration.Update', 'http://tsep.sourceforge.net/updater/getUpdate.php?');
 
38
 
 
39
Configure::write('UserAgent', 'TSEP');
 
40
 
 
41
/**
 
42
 * CakePHP Debug Level:
 
43
 *
 
44
 * Production Mode:
 
45
 *      0: No error messages, errors, or warnings shown. Flash messages redirect.
 
46
 *
 
47
 * Development Mode:
 
48
 *      1: Errors and warnings shown, model caches refreshed, flash messages halted.
 
49
 *      2: As in 1, but also with full debug messages and SQL output.
 
50
 *
 
51
 * In production mode, flash messages redirect after a time interval.
 
52
 * In development mode, you need to click the flash message to continue.
 
53
 */
 
54
        Configure::write('debug', 0);
 
55
 
 
56
/**
 
57
 * CakePHP Log Level:
 
58
 *
 
59
 * In case of Production Mode CakePHP gives you the possibility to continue logging errors.
 
60
 *
 
61
 * The following parameters can be used:
 
62
 *  Boolean: Set true/false to activate/deactivate logging
 
63
 *    Configure::write('log', true);
 
64
 *
 
65
 *  Integer: Use built-in PHP constants to set the error level (see error_reporting)
 
66
 *    Configure::write('log', E_ERROR | E_WARNING);
 
67
 *    Configure::write('log', E_ALL ^ E_NOTICE);
 
68
 */
 
69
        Configure::write('log', true);
 
70
 
 
71
/**
 
72
 * Application wide charset encoding
 
73
 */
 
74
        Configure::write('App.encoding', 'UTF-8');
 
75
 
 
76
/**
 
77
 * To configure CakePHP *not* to use mod_rewrite and to
 
78
 * use CakePHP pretty URLs, remove these .htaccess
 
79
 * files:
 
80
 *
 
81
 * /.htaccess
 
82
 * /app/.htaccess
 
83
 * /app/webroot/.htaccess
 
84
 *
 
85
 * And uncomment the App.baseUrl below:
 
86
 */
 
87
        //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
 
88
 
 
89
/**
 
90
 * Uncomment the define below to use CakePHP prefix routes.
 
91
 *
 
92
 * The value of the define determines the names of the routes
 
93
 * and their associated controller actions:
 
94
 *
 
95
 * Set to an array of prefixes you want to use in your application. Use for
 
96
 * admin or other prefixed routes.
 
97
 *
 
98
 *      Routing.prefixes = array('admin', 'manager');
 
99
 *
 
100
 * Enables:
 
101
 *      `admin_index()` and `/admin/controller/index`
 
102
 *      `manager_index()` and `/manager/controller/index`
 
103
 *
 
104
 * [Note Routing.admin is deprecated in 1.3.  Use Routing.prefixes instead]
 
105
 */
 
106
        Configure::write('Routing.prefixes', array('admin'));
 
107
 
 
108
/**
 
109
 * Turn off all caching application-wide.
 
110
 *
 
111
 */
 
112
        //Configure::write('Cache.disable', true);
 
113
 
 
114
/**
 
115
 * Enable cache checking.
 
116
 *
 
117
 * If set to true, for view caching you must still use the controller
 
118
 * var $cacheAction inside your controllers to define caching settings.
 
119
 * You can either set it controller-wide by setting var $cacheAction = true,
 
120
 * or in each action using $this->cacheAction = true.
 
121
 *
 
122
 */
 
123
        //Configure::write('Cache.check', true);
 
124
 
 
125
/**
 
126
 * Defines the default error type when using the log() function. Used for
 
127
 * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
 
128
 */
 
129
        define('LOG_ERROR', 2);
 
130
 
 
131
/**
 
132
 * The preferred session handling method. Valid values:
 
133
 *
 
134
 * 'php'                        Uses settings defined in your php.ini.
 
135
 * 'cake'               Saves session files in CakePHP's /tmp directory.
 
136
 * 'database'   Uses CakePHP's database sessions.
 
137
 *
 
138
 * To define a custom session handler, save it at /app/config/<name>.php.
 
139
 * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
 
140
 *
 
141
 * To use database sessions, run the app/config/schema/sessions.php schema using
 
142
 * the cake shell command: cake schema create Sessions
 
143
 *
 
144
 */
 
145
        Configure::write('Session.save', 'php');
 
146
 
 
147
/**
 
148
 * The model name to be used for the session model.
 
149
 *
 
150
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 
151
 *
 
152
 * The model name set here should *not* be used elsewhere in your application.
 
153
 */
 
154
        //Configure::write('Session.model', 'Session');
 
155
 
 
156
/**
 
157
 * The name of the table used to store CakePHP database sessions.
 
158
 *
 
159
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 
160
 *
 
161
 * The table name set here should *not* include any table prefix defined elsewhere.
 
162
 *
 
163
 * Please note that if you set a value for Session.model (above), any value set for
 
164
 * Session.table will be ignored.
 
165
 *
 
166
 * [Note: Session.table is deprecated as of CakePHP 1.3]
 
167
 */
 
168
        //Configure::write('Session.table', 'cake_sessions');
 
169
 
 
170
/**
 
171
 * The DATABASE_CONFIG::$var to use for database session handling.
 
172
 *
 
173
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 
174
 */
 
175
        //Configure::write('Session.database', 'default');
 
176
 
 
177
/**
 
178
 * The name of CakePHP's session cookie.
 
179
 *
 
180
 * Note the guidelines for Session names states: "The session name references
 
181
 * the session id in cookies and URLs. It should contain only alphanumeric
 
182
 * characters."
 
183
 * @link http://php.net/session_name
 
184
 */
 
185
        Configure::write('Session.cookie', 'TSEP');
 
186
 
 
187
/**
 
188
 * Session time out time (in minutes).
 
189
 * Actual value depends on 'Security.level' setting.
 
190
 */
 
191
        Configure::write('Session.timeout', '120');
 
192
 
 
193
/**
 
194
 * If set to false, sessions are not automatically started.
 
195
 */
 
196
        Configure::write('Session.start', true);
 
197
 
 
198
/**
 
199
 * When set to false, HTTP_USER_AGENT will not be checked
 
200
 * in the session
 
201
 */
 
202
        Configure::write('Session.checkAgent', true);
 
203
 
 
204
/**
 
205
 * The level of CakePHP security. The session timeout time defined
 
206
 * in 'Session.timeout' is multiplied according to the settings here.
 
207
 * Valid values:
 
208
 *
 
209
 * 'high'   Session timeout in 'Session.timeout' x 10
 
210
 * 'medium' Session timeout in 'Session.timeout' x 100
 
211
 * 'low'    Session timeout in 'Session.timeout' x 300
 
212
 *
 
213
 * CakePHP session IDs are also regenerated between requests if
 
214
 * 'Security.level' is set to 'high'.
 
215
 */
 
216
        Configure::write('Security.level', 'medium');
 
217
 
 
218
/**
 
219
 * A random string used in security hashing methods.
 
220
 */
 
221
        $ini = Configure::read('Configuration.ini');
 
222
        Configure::write('Security.salt', $ini['security']['salt']);
 
223
        unset($ini);
 
224
 
 
225
/**
 
226
 * A random numeric string (digits only) used to encrypt/decrypt strings.
 
227
 */
 
228
        $ini = Configure::read('Configuration.ini');
 
229
        Configure::write('Security.cipherSeed', $ini['security']['cipherSeed']);
 
230
        unset($ini);
 
231
 
 
232
/**
 
233
 * Apply timestamps with the last modified time to static assets (js, css, images).
 
234
 * Will append a querystring parameter containing the time the file was modified. This is
 
235
 * useful for invalidating browser caches.
 
236
 *
 
237
 * Set to `true` to apply timestamps, when debug = 0, or set to 'force' to always enable
 
238
 * timestamping.
 
239
 */
 
240
        //Configure::write('Asset.timestamp', true);
 
241
/**
 
242
 * Compress CSS output by removing comments, whitespace, repeating tags, etc.
 
243
 * This requires a/var/cache directory to be writable by the web server for caching.
 
244
 * and /vendors/csspp/csspp.php
 
245
 *
 
246
 * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
 
247
 */
 
248
        //Configure::write('Asset.filter.css', 'css.php');
 
249
 
 
250
/**
 
251
 * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
 
252
 * output, and setting the config below to the name of the script.
 
253
 *
 
254
 * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
 
255
 */
 
256
        //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
 
257
 
 
258
/**
 
259
 * The classname and database used in CakePHP's
 
260
 * access control lists.
 
261
 */
 
262
        Configure::write('Acl.classname', 'DbAcl');
 
263
        Configure::write('Acl.database', 'default');
 
264
 
 
265
/**
 
266
 * If you are on PHP 5.3 uncomment this line and correct your server timezone
 
267
 * to fix the date & time related errors.
 
268
 */
 
269
        //date_default_timezone_set('UTC');
 
270
 
 
271
/**
 
272
 *
 
273
 * Cache Engine Configuration
 
274
 * Default settings provided below
 
275
 *
 
276
 * File storage engine.
 
277
 *
 
278
 *       Cache::config('default', array(
 
279
 *              'engine' => 'File', //[required]
 
280
 *              'duration'=> 3600, //[optional]
 
281
 *              'probability'=> 100, //[optional]
 
282
 *              'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
 
283
 *              'prefix' => 'cake_', //[optional]  prefix every cache file with this string
 
284
 *              'lock' => false, //[optional]  use file locking
 
285
 *              'serialize' => true, [optional]
 
286
 *      ));
 
287
 *
 
288
 *
 
289
 * APC (http://pecl.php.net/package/APC)
 
290
 *
 
291
 *       Cache::config('default', array(
 
292
 *              'engine' => 'Apc', //[required]
 
293
 *              'duration'=> 3600, //[optional]
 
294
 *              'probability'=> 100, //[optional]
 
295
 *              'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
 
296
 *      ));
 
297
 *
 
298
 * Xcache (http://xcache.lighttpd.net/)
 
299
 *
 
300
 *       Cache::config('default', array(
 
301
 *              'engine' => 'Xcache', //[required]
 
302
 *              'duration'=> 3600, //[optional]
 
303
 *              'probability'=> 100, //[optional]
 
304
 *              'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
 
305
 *              'user' => 'user', //user from xcache.admin.user settings
 
306
 *      'password' => 'password', //plaintext password (xcache.admin.pass)
 
307
 *      ));
 
308
 *
 
309
 *
 
310
 * Memcache (http://www.danga.com/memcached/)
 
311
 *
 
312
 *       Cache::config('default', array(
 
313
 *              'engine' => 'Memcache', //[required]
 
314
 *              'duration'=> 3600, //[optional]
 
315
 *              'probability'=> 100, //[optional]
 
316
 *              'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
 
317
 *              'servers' => array(
 
318
 *                      '127.0.0.1:11211' // localhost, default port 11211
 
319
 *              ), //[optional]
 
320
 *              'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
 
321
 *      ));
 
322
 *
 
323
 */
 
324
        Cache::config('default', array('engine' => 'File'));