統計
| ブランチ: | リビジョン:

pictcode / app / Config / core.php @ 9d2f0219

履歴 | 表示 | アノテート | ダウンロード (14.174 KB)

1
<?php
2
/**
3
 * This is core configuration file.
4
 *
5
 * Use it to configure core behavior of Cake.
6
 *
7
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
9
 *
10
 * Licensed under The MIT License
11
 * For full copyright and license information, please see the LICENSE.txt
12
 * Redistributions of files must retain the above copyright notice.
13
 *
14
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
15
 * @link          http://cakephp.org CakePHP(tm) Project
16
 * @package       app.Config
17
 * @since         CakePHP(tm) v 0.2.9
18
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
19
 */
20

    
21
//setLocale(LC_ALL, 'deu');
22
//Configure::write('Config.language', 'deu');
23

    
24
/**
25
 * CakePHP Debug Level:
26
 *
27
 * Production Mode:
28
 *         0: No error messages, errors, or warnings shown. Flash messages redirect.
29
 *
30
 * Development Mode:
31
 *         1: Errors and warnings shown, model caches refreshed, flash messages halted.
32
 *         2: As in 1, but also with full debug messages and SQL output.
33
 *
34
 * In production mode, flash messages redirect after a time interval.
35
 * In development mode, you need to click the flash message to continue.
36
 */
37
        Configure::write('debug',0 );
38

    
39
/**
40
 * Configure the Error handler used to handle errors for your application. By default
41
 * ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
42
 * and log errors with CakeLog when debug = 0.
43
 *
44
 * Options:
45
 *
46
 * - `handler` - callback - The callback to handle errors. You can set this to any callable type,
47
 *   including anonymous functions.
48
 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
49
 * - `level` - integer - The level of errors you are interested in capturing.
50
 * - `trace` - boolean - Include stack traces for errors in log files.
51
 *
52
 * @see ErrorHandler for more information on error handling and configuration.
53
 */
54
        Configure::write('Error', array(
55
                'handler' => 'ErrorHandler::handleError',
56
                'level' => E_ALL & ~E_DEPRECATED,
57
                'trace' => true
58
        ));
59

    
60
/**
61
 * Configure the Exception handler used for uncaught exceptions. By default,
62
 * ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
63
 * while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
64
 * framework errors will be coerced into generic HTTP errors.
65
 *
66
 * Options:
67
 *
68
 * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
69
 *   including anonymous functions.
70
 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
71
 * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
72
 *   should place the file for that class in app/Lib/Error. This class needs to implement a render method.
73
 * - `log` - boolean - Should Exceptions be logged?
74
 * - `skipLog` - array - list of exceptions to skip for logging. Exceptions that
75
 *   extend one of the listed exceptions will also be skipped for logging.
76
 *   Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')`
77
 *
78
 * @see ErrorHandler for more information on exception handling and configuration.
79
 */
80
        Configure::write('Exception', array(
81
                'handler' => 'ErrorHandler::handleException',
82
                'renderer' => 'ExceptionRenderer',
83
                'log' => true
84
        ));
85

    
86
/**
87
 * Application wide charset encoding
88
 */
89
        Configure::write('App.encoding', 'UTF-8');
90

    
91
/**
92
 * To configure CakePHP *not* to use mod_rewrite and to
93
 * use CakePHP pretty URLs, remove these .htaccess
94
 * files:
95
 *
96
 * /.htaccess
97
 * /app/.htaccess
98
 * /app/webroot/.htaccess
99
 *
100
 * And uncomment the App.baseUrl below. But keep in mind
101
 * that plugin assets such as images, CSS and JavaScript files
102
 * will not work without URL rewriting!
103
 * To work around this issue you should either symlink or copy
104
 * the plugin assets into you app's webroot directory. This is
105
 * recommended even when you are using mod_rewrite. Handling static
106
 * assets through the Dispatcher is incredibly inefficient and
107
 * included primarily as a development convenience - and
108
 * thus not recommended for production applications.
109
 */
110
        //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
111

    
112
/**
113
 * To configure CakePHP to use a particular domain URL
114
 * for any URL generation inside the application, set the following
115
 * configuration variable to the http(s) address to your domain. This
116
 * will override the automatic detection of full base URL and can be
117
 * useful when generating links from the CLI (e.g. sending emails)
118
 */
119
        //Configure::write('App.fullBaseUrl', 'http://example.com');
120

    
121
/**
122
 * Web path to the public images directory under webroot.
123
 * If not set defaults to 'img/'
124
 */
125
        //Configure::write('App.imageBaseUrl', 'img/');
126

    
127
/**
128
 * Web path to the CSS files directory under webroot.
129
 * If not set defaults to 'css/'
130
 */
131
        //Configure::write('App.cssBaseUrl', 'css/');
132

    
133
/**
134
 * Web path to the js files directory under webroot.
135
 * If not set defaults to 'js/'
136
 */
137
        //Configure::write('App.jsBaseUrl', 'js/');
138

    
139
/**
140
 * Uncomment the define below to use CakePHP prefix routes.
141
 *
142
 * The value of the define determines the names of the routes
143
 * and their associated controller actions:
144
 *
145
 * Set to an array of prefixes you want to use in your application. Use for
146
 * admin or other prefixed routes.
147
 *
148
 *         Routing.prefixes = array('admin', 'manager');
149
 *
150
 * Enables:
151
 *        `admin_index()` and `/admin/controller/index`
152
 *        `manager_index()` and `/manager/controller/index`
153
 */
154
        //Configure::write('Routing.prefixes', array('admin'));
155

    
156
/**
157
 * Turn off all caching application-wide.
158
 */
159
        //Configure::write('Cache.disable', true);
160

    
161
/**
162
 * Enable cache checking.
163
 *
164
 * If set to true, for view caching you must still use the controller
165
 * public $cacheAction inside your controllers to define caching settings.
166
 * You can either set it controller-wide by setting public $cacheAction = true,
167
 * or in each action using $this->cacheAction = true.
168
 */
169
        //Configure::write('Cache.check', true);
170

    
171
/**
172
 * Enable cache view prefixes.
173
 *
174
 * If set it will be prepended to the cache name for view file caching. This is
175
 * helpful if you deploy the same application via multiple subdomains and languages,
176
 * for instance. Each version can then have its own view cache namespace.
177
 * Note: The final cache file name will then be `prefix_cachefilename`.
178
 */
179
        //Configure::write('Cache.viewPrefix', 'prefix');
180

    
181
/**
182
 * Session configuration.
183
 *
184
 * Contains an array of settings to use for session configuration. The defaults key is
185
 * used to define a default preset to use for sessions, any settings declared here will override
186
 * the settings of the default config.
187
 *
188
 * ## Options
189
 *
190
 * - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
191
 * - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
192
 * - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
193
 * - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
194
 *    value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
195
 * - `Session.defaults` - The default configuration set to use as a basis for your session.
196
 *    There are four builtins: php, cake, cache, database.
197
 * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
198
 *    that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
199
 *    to the ini array.
200
 * - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
201
 *    sessionids that change frequently. See CakeSession::$requestCountdown.
202
 * - `Session.ini` - An associative array of additional ini values to set.
203
 *
204
 * The built in defaults are:
205
 *
206
 * - 'php' - Uses settings defined in your php.ini.
207
 * - 'cake' - Saves session files in CakePHP's /tmp directory.
208
 * - 'database' - Uses CakePHP's database sessions.
209
 * - 'cache' - Use the Cache class to save sessions.
210
 *
211
 * To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
212
 * Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
213
 *
214
 * To use database sessions, run the app/Config/Schema/sessions.php schema using
215
 * the cake shell command: cake schema create Sessions
216
 */
217
        Configure::write('Session', array(
218
                'defaults' => 'php'
219
        ));
220

    
221
/**
222
 * A random string used in security hashing methods.
223
 */
224
        Configure::write('Security.salt', 'DYhG93b0qyJfIxfsjKeVoUubWwvniR2G0FgaC9mi');
225

    
226
/**
227
 * A random numeric string (digits only) used to encrypt/decrypt strings.
228
 */
229
        Configure::write('Security.cipherSeed', '76859309657496742496749683645');
230

    
231
/**
232
 * Apply timestamps with the last modified time to static assets (js, css, images).
233
 * Will append a query string parameter containing the time the file was modified. This is
234
 * useful for invalidating browser caches.
235
 *
236
 * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
237
 * timestamping regardless of debug value.
238
 */
239
        //Configure::write('Asset.timestamp', true);
240

    
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 JsHelper::link().
255
 */
256
        //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
257

    
258
/**
259
 * The class name 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
 * Uncomment this line and correct your server timezone to fix
267
 * any date & time related errors.
268
 */
269
        //date_default_timezone_set('UTC');
270

    
271
/**
272
 * `Config.timezone` is available in which you can set users' timezone string.
273
 * If a method of CakeTime class is called with $timezone parameter as null and `Config.timezone` is set,
274
 * then the value of `Config.timezone` will be used. This feature allows you to set users' timezone just
275
 * once instead of passing it each time in function calls.
276
 */
277
        //Configure::write('Config.timezone', 'Europe/Paris');
278

    
279
/**
280
 * Cache Engine Configuration
281
 * Default settings provided below
282
 *
283
 * File storage engine.
284
 *
285
 *          Cache::config('default', array(
286
 *                'engine' => 'File', //[required]
287
 *                'duration' => 3600, //[optional]
288
 *                'probability' => 100, //[optional]
289
 *                 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
290
 *                 'prefix' => 'cake_', //[optional]  prefix every cache file with this string
291
 *                 'lock' => false, //[optional]  use file locking
292
 *                 'serialize' => true, //[optional]
293
 *                 'mask' => 0664, //[optional]
294
 *        ));
295
 *
296
 * APC (http://pecl.php.net/package/APC)
297
 *
298
 *          Cache::config('default', array(
299
 *                'engine' => 'Apc', //[required]
300
 *                'duration' => 3600, //[optional]
301
 *                'probability' => 100, //[optional]
302
 *                 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
303
 *        ));
304
 *
305
 * Xcache (http://xcache.lighttpd.net/)
306
 *
307
 *          Cache::config('default', array(
308
 *                'engine' => 'Xcache', //[required]
309
 *                'duration' => 3600, //[optional]
310
 *                'probability' => 100, //[optional]
311
 *                'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
312
 *                'user' => 'user', //user from xcache.admin.user settings
313
 *                'password' => 'password', //plaintext password (xcache.admin.pass)
314
 *        ));
315
 *
316
 * Memcached (http://www.danga.com/memcached/)
317
 *
318
 * Uses the memcached extension. See http://php.net/memcached
319
 *
320
 *          Cache::config('default', array(
321
 *                'engine' => 'Memcached', //[required]
322
 *                'duration' => 3600, //[optional]
323
 *                'probability' => 100, //[optional]
324
 *                 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
325
 *                 'servers' => array(
326
 *                         '127.0.0.1:11211' // localhost, default port 11211
327
 *                 ), //[optional]
328
 *                 'persistent' => 'my_connection', // [optional] The name of the persistent connection.
329
 *                 'compress' => false, // [optional] compress data in Memcached (slower, but uses less memory)
330
 *        ));
331
 *
332
 *  Wincache (http://php.net/wincache)
333
 *
334
 *          Cache::config('default', array(
335
 *                'engine' => 'Wincache', //[required]
336
 *                'duration' => 3600, //[optional]
337
 *                'probability' => 100, //[optional]
338
 *                'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
339
 *        ));
340
 */
341

    
342
/**
343
 * Configure the cache handlers that CakePHP will use for internal
344
 * metadata like class maps, and model schema.
345
 *
346
 * By default File is used, but for improved performance you should use APC.
347
 *
348
 * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
349
 *       Please check the comments in bootstrap.php for more info on the cache engines available
350
 *       and their settings.
351
 */
352
$engine = 'File';
353

    
354
// In development mode, caches should expire quickly.
355
$duration = '+999 days';
356
if (Configure::read('debug') > 0) {
357
        $duration = '+10 seconds';
358
}
359

    
360
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
361
$prefix = 'myapp_';
362

    
363
/**
364
 * Configure the cache used for general framework caching. Path information,
365
 * object listings, and translation cache files are stored with this configuration.
366
 */
367
Cache::config('_cake_core_', array(
368
        'engine' => $engine,
369
        'prefix' => $prefix . 'cake_core_',
370
        'path' => CACHE . 'persistent' . DS,
371
        'serialize' => ($engine === 'File'),
372
        'duration' => $duration
373
));
374

    
375
/**
376
 * Configure the cache for model and datasource caches. This cache configuration
377
 * is used to store schema descriptions, and table listings in connections.
378
 */
379
Cache::config('_cake_model_', array(
380
        'engine' => $engine,
381
        'prefix' => $prefix . 'cake_model_',
382
        'path' => CACHE . 'models' . DS,
383
        'serialize' => ($engine === 'File'),
384
        'duration' => $duration
385
));