PageRenderTime 35ms CodeModel.GetById 16ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/app/Config/core.php

https://github.com/decapattack/fishbox
PHP | 388 lines | 40 code | 28 blank | 320 comment | 1 complexity | 09f68a74fd4a0fc292adf703ccf08525 MD5 | raw file
  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/**
 22 * CakePHP Debug Level:
 23 *
 24 * Production Mode:
 25 * 	0: No error messages, errors, or warnings shown. Flash messages redirect.
 26 *
 27 * Development Mode:
 28 * 	1: Errors and warnings shown, model caches refreshed, flash messages halted.
 29 * 	2: As in 1, but also with full debug messages and SQL output.
 30 *
 31 * In production mode, flash messages redirect after a time interval.
 32 * In development mode, you need to click the flash message to continue.
 33 */
 34	Configure::write('debug', 3);
 35
 36/**
 37 * Configure the Error handler used to handle errors for your application. By default
 38 * ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
 39 * and log errors with CakeLog when debug = 0.
 40 *
 41 * Options:
 42 *
 43 * - `handler` - callback - The callback to handle errors. You can set this to any callable type,
 44 *   including anonymous functions.
 45 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
 46 * - `level` - integer - The level of errors you are interested in capturing.
 47 * - `trace` - boolean - Include stack traces for errors in log files.
 48 *
 49 * @see ErrorHandler for more information on error handling and configuration.
 50 */
 51	Configure::write('Error', array(
 52		'handler' => 'ErrorHandler::handleError',
 53		'level' => E_ALL & ~E_DEPRECATED,
 54		'trace' => true
 55	));
 56
 57/**
 58 * Configure the Exception handler used for uncaught exceptions. By default,
 59 * ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
 60 * while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
 61 * framework errors will be coerced into generic HTTP errors.
 62 *
 63 * Options:
 64 *
 65 * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
 66 *   including anonymous functions.
 67 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
 68 * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
 69 *   should place the file for that class in app/Lib/Error. This class needs to implement a render method.
 70 * - `log` - boolean - Should Exceptions be logged?
 71 * - `skipLog` - array - list of exceptions to skip for logging. Exceptions that
 72 *   extend one of the listed exceptions will also be skipped for logging.
 73 *   Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')`
 74 *
 75 * @see ErrorHandler for more information on exception handling and configuration.
 76 */
 77	Configure::write('Exception', array(
 78		'handler' => 'ErrorHandler::handleException',
 79		'renderer' => 'ExceptionRenderer',
 80		'log' => true
 81	));
 82
 83/**
 84 * Application wide charset encoding
 85 */
 86	Configure::write('App.encoding', 'UTF-8');
 87
 88/**
 89 * To configure CakePHP *not* to use mod_rewrite and to
 90 * use CakePHP pretty URLs, remove these .htaccess
 91 * files:
 92 *
 93 * /.htaccess
 94 * /app/.htaccess
 95 * /app/webroot/.htaccess
 96 *
 97 * And uncomment the App.baseUrl below. But keep in mind
 98 * that plugin assets such as images, CSS and JavaScript files
 99 * will not work without URL rewriting!
100 * To work around this issue you should either symlink or copy
101 * the plugin assets into you app's webroot directory. This is
102 * recommended even when you are using mod_rewrite. Handling static
103 * assets through the Dispatcher is incredibly inefficient and
104 * included primarily as a development convenience - and
105 * thus not recommended for production applications.
106 */
107	//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
108
109/**
110 * To configure CakePHP to use a particular domain URL
111 * for any URL generation inside the application, set the following
112 * configuration variable to the http(s) address to your domain. This
113 * will override the automatic detection of full base URL and can be
114 * useful when generating links from the CLI (e.g. sending emails)
115 */
116	//Configure::write('App.fullBaseUrl', 'http://example.com');
117
118/**
119 * Web path to the public images directory under webroot.
120 * If not set defaults to 'img/'
121 */
122	//Configure::write('App.imageBaseUrl', 'img/');
123
124/**
125 * Web path to the CSS files directory under webroot.
126 * If not set defaults to 'css/'
127 */
128	//Configure::write('App.cssBaseUrl', 'css/');
129
130/**
131 * Web path to the js files directory under webroot.
132 * If not set defaults to 'js/'
133 */
134	//Configure::write('App.jsBaseUrl', 'js/');
135
136/**
137 * Uncomment the define below to use CakePHP prefix routes.
138 *
139 * The value of the define determines the names of the routes
140 * and their associated controller actions:
141 *
142 * Set to an array of prefixes you want to use in your application. Use for
143 * admin or other prefixed routes.
144 *
145 * 	Routing.prefixes = array('admin', 'manager');
146 *
147 * Enables:
148 *	`admin_index()` and `/admin/controller/index`
149 *	`manager_index()` and `/manager/controller/index`
150 *
151 */
152	//Configure::write('Routing.prefixes', array('admin'));
153
154/**
155 * Turn off all caching application-wide.
156 *
157 */
158	//Configure::write('Cache.disable', true);
159
160/**
161 * Enable cache checking.
162 *
163 * If set to true, for view caching you must still use the controller
164 * public $cacheAction inside your controllers to define caching settings.
165 * You can either set it controller-wide by setting public $cacheAction = true,
166 * or in each action using $this->cacheAction = true.
167 *
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 */
218	Configure::write('Session', array(
219		'defaults' => 'php'
220	));
221
222/**
223 * A random string used in security hashing methods.
224 */
225	//Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
226	Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9ni');
227
228/**
229 * A random numeric string (digits only) used to encrypt/decrypt strings.
230 */
231	//Configure::write('Security.cipherSeed', '76859309657453542496749683645');
232	Configure::write('Security.cipherSeed', '01259309657453542496749683645');
233
234/**
235 * Apply timestamps with the last modified time to static assets (js, css, images).
236 * Will append a query string parameter containing the time the file was modified. This is
237 * useful for invalidating browser caches.
238 *
239 * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
240 * timestamping regardless of debug value.
241 */
242	//Configure::write('Asset.timestamp', true);
243
244/**
245 * Compress CSS output by removing comments, whitespace, repeating tags, etc.
246 * This requires a/var/cache directory to be writable by the web server for caching.
247 * and /vendors/csspp/csspp.php
248 *
249 * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
250 */
251	//Configure::write('Asset.filter.css', 'css.php');
252
253/**
254 * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
255 * output, and setting the config below to the name of the script.
256 *
257 * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JsHelper::link().
258 */
259	//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
260
261/**
262 * The class name and database used in CakePHP's
263 * access control lists.
264 */
265	Configure::write('Acl.classname', 'DbAcl');
266	Configure::write('Acl.database', 'default');
267
268/**
269 * Uncomment this line and correct your server timezone to fix
270 * any date & time related errors.
271 */
272	//date_default_timezone_set('UTC');
273
274/**
275 * `Config.timezone` is available in which you can set users' timezone string.
276 * If a method of CakeTime class is called with $timezone parameter as null and `Config.timezone` is set,
277 * then the value of `Config.timezone` will be used. This feature allows you to set users' timezone just
278 * once instead of passing it each time in function calls.
279 */
280	//Configure::write('Config.timezone', 'Europe/Paris');
281
282/**
283 * Cache Engine Configuration
284 * Default settings provided below
285 *
286 * File storage engine.
287 *
288 * 	 Cache::config('default', array(
289 *		'engine' => 'File', //[required]
290 *		'duration' => 3600, //[optional]
291 *		'probability' => 100, //[optional]
292 * 		'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
293 * 		'prefix' => 'cake_', //[optional]  prefix every cache file with this string
294 * 		'lock' => false, //[optional]  use file locking
295 * 		'serialize' => true, //[optional]
296 * 		'mask' => 0664, //[optional]
297 *	));
298 *
299 * APC (http://pecl.php.net/package/APC)
300 *
301 * 	 Cache::config('default', array(
302 *		'engine' => 'Apc', //[required]
303 *		'duration' => 3600, //[optional]
304 *		'probability' => 100, //[optional]
305 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
306 *	));
307 *
308 * Xcache (http://xcache.lighttpd.net/)
309 *
310 * 	 Cache::config('default', array(
311 *		'engine' => 'Xcache', //[required]
312 *		'duration' => 3600, //[optional]
313 *		'probability' => 100, //[optional]
314 *		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
315 *		'user' => 'user', //user from xcache.admin.user settings
316 *		'password' => 'password', //plaintext password (xcache.admin.pass)
317 *	));
318 *
319 * Memcached (http://www.danga.com/memcached/)
320 *
321 * Uses the memcached extension. See http://php.net/memcached
322 *
323 * 	 Cache::config('default', array(
324 *		'engine' => 'Memcached', //[required]
325 *		'duration' => 3600, //[optional]
326 *		'probability' => 100, //[optional]
327 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
328 * 		'servers' => array(
329 * 			'127.0.0.1:11211' // localhost, default port 11211
330 * 		), //[optional]
331 * 		'persistent' => 'my_connection', // [optional] The name of the persistent connection.
332 * 		'compress' => false, // [optional] compress data in Memcached (slower, but uses less memory)
333 *	));
334 *
335 *  Wincache (http://php.net/wincache)
336 *
337 * 	 Cache::config('default', array(
338 *		'engine' => 'Wincache', //[required]
339 *		'duration' => 3600, //[optional]
340 *		'probability' => 100, //[optional]
341 *		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
342 *	));
343 */
344
345/**
346 * Configure the cache handlers that CakePHP will use for internal
347 * metadata like class maps, and model schema.
348 *
349 * By default File is used, but for improved performance you should use APC.
350 *
351 * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
352 *       Please check the comments in bootstrap.php for more info on the cache engines available
353 *       and their settings.
354 */
355$engine = 'File';
356
357// In development mode, caches should expire quickly.
358$duration = '+999 days';
359if (Configure::read('debug') > 0) {
360	$duration = '+10 seconds';
361}
362
363// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
364$prefix = 'myapp_';
365
366/**
367 * Configure the cache used for general framework caching. Path information,
368 * object listings, and translation cache files are stored with this configuration.
369 */
370Cache::config('_cake_core_', array(
371	'engine' => $engine,
372	'prefix' => $prefix . 'cake_core_',
373	'path' => CACHE . 'persistent' . DS,
374	'serialize' => ($engine === 'File'),
375	'duration' => $duration
376));
377
378/**
379 * Configure the cache for model and datasource caches. This cache configuration
380 * is used to store schema descriptions, and table listings in connections.
381 */
382Cache::config('_cake_model_', array(
383	'engine' => $engine,
384	'prefix' => $prefix . 'cake_model_',
385	'path' => CACHE . 'models' . DS,
386	'serialize' => ($engine === 'File'),
387	'duration' => $duration
388));