Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13532 anikendra 1
<?php
2
/**
3
 * This is core configuration file.
4
 *
5
 * Use it to configure core behavior of Cake.
6
 *
7
 * @link          http://cakephp.org CakePHP(tm) Project
8
 * @package       app.Config
9
 * @since         CakePHP(tm) v 0.2.9
10
 */
11
 
12
/**
13
 * CakePHP Debug Level:
14
 *
15
 * Production Mode:
16
 * 	0: No error messages, errors, or warnings shown. Flash messages redirect.
17
 *
18
 * Development Mode:
19
 * 	1: Errors and warnings shown, model caches refreshed, flash messages halted.
20
 * 	2: As in 1, but also with full debug messages and SQL output.
21
 *
22
 * In production mode, flash messages redirect after a time interval.
23
 * In development mode, you need to click the flash message to continue.
24
 */
25
	Configure::write('debug', 2);
26
 
27
/**
28
 * Configure the Error handler used to handle errors for your application. By default
29
 * ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
30
 * and log errors with CakeLog when debug = 0.
31
 *
32
 * Options:
33
 *
34
 * - `handler` - callback - The callback to handle errors. You can set this to any callable type,
35
 *   including anonymous functions.
36
 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
37
 * - `level` - integer - The level of errors you are interested in capturing.
38
 * - `trace` - boolean - Include stack traces for errors in log files.
39
 *
40
 * @see ErrorHandler for more information on error handling and configuration.
41
 */
42
	Configure::write('Error', array(
43
		'handler' => 'ErrorHandler::handleError',
44
		'level' => E_ALL & ~E_DEPRECATED,
45
		'trace' => true
46
	));
47
 
48
/**
49
 * Configure the Exception handler used for uncaught exceptions. By default,
50
 * ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
51
 * while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
52
 * framework errors will be coerced into generic HTTP errors.
53
 *
54
 * Options:
55
 *
56
 * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
57
 *   including anonymous functions.
58
 *   Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
59
 * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
60
 *   should place the file for that class in app/Lib/Error. This class needs to implement a render method.
61
 * - `log` - boolean - Should Exceptions be logged?
62
 * - `skipLog` - array - list of exceptions to skip for logging. Exceptions that
63
 *   extend one of the listed exceptions will also be skipped for logging.
64
 *   Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')`
65
 *
66
 * @see ErrorHandler for more information on exception handling and configuration.
67
 */
68
	Configure::write('Exception', array(
69
		'handler' => 'ErrorHandler::handleException',
70
		'renderer' => 'ExceptionRenderer',
71
		'log' => true
72
	));
73
 
74
/**
75
 * Application wide charset encoding
76
 */
77
	Configure::write('App.encoding', 'UTF-8');
78
 
79
/**
80
 * To configure CakePHP *not* to use mod_rewrite and to
81
 * use CakePHP pretty URLs, remove these .htaccess
82
 * files:
83
 *
84
 * /.htaccess
85
 * /app/.htaccess
86
 * /app/webroot/.htaccess
87
 *
88
 * And uncomment the App.baseUrl below. But keep in mind
89
 * that plugin assets such as images, CSS and JavaScript files
90
 * will not work without URL rewriting!
91
 * To work around this issue you should either symlink or copy
92
 * the plugin assets into you app's webroot directory. This is
93
 * recommended even when you are using mod_rewrite. Handling static
94
 * assets through the Dispatcher is incredibly inefficient and
95
 * included primarily as a development convenience - and
96
 * thus not recommended for production applications.
97
 */
98
	//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
99
 
100
/**
101
 * To configure CakePHP to use a particular domain URL
102
 * for any URL generation inside the application, set the following
103
 * configuration variable to the http(s) address to your domain. This
104
 * will override the automatic detection of full base URL and can be
105
 * useful when generating links from the CLI (e.g. sending emails)
106
 */
107
	//Configure::write('App.fullBaseUrl', 'http://example.com');
108
 
109
/**
110
 * Web path to the public images directory under webroot.
111
 * If not set defaults to 'img/'
112
 */
113
	//Configure::write('App.imageBaseUrl', 'img/');
114
 
115
/**
116
 * Web path to the CSS files directory under webroot.
117
 * If not set defaults to 'css/'
118
 */
119
	//Configure::write('App.cssBaseUrl', 'css/');
120
 
121
/**
122
 * Web path to the js files directory under webroot.
123
 * If not set defaults to 'js/'
124
 */
125
	//Configure::write('App.jsBaseUrl', 'js/');
126
 
127
/**
128
 * Uncomment the define below to use CakePHP prefix routes.
129
 *
130
 * The value of the define determines the names of the routes
131
 * and their associated controller actions:
132
 *
133
 * Set to an array of prefixes you want to use in your application. Use for
134
 * admin or other prefixed routes.
135
 *
136
 * 	Routing.prefixes = array('admin', 'manager');
137
 *
138
 * Enables:
139
 *	`admin_index()` and `/admin/controller/index`
140
 *	`manager_index()` and `/manager/controller/index`
141
 *
142
 */
143
	//Configure::write('Routing.prefixes', array('admin'));
144
 
145
/**
146
 * Turn off all caching application-wide.
147
 *
148
 */
149
	//Configure::write('Cache.disable', true);
150
 
151
/**
152
 * Enable cache checking.
153
 *
154
 * If set to true, for view caching you must still use the controller
155
 * public $cacheAction inside your controllers to define caching settings.
156
 * You can either set it controller-wide by setting public $cacheAction = true,
157
 * or in each action using $this->cacheAction = true.
158
 *
159
 */
160
	//Configure::write('Cache.check', true);
161
 
162
/**
163
 * Enable cache view prefixes.
164
 *
165
 * If set it will be prepended to the cache name for view file caching. This is
166
 * helpful if you deploy the same application via multiple subdomains and languages,
167
 * for instance. Each version can then have its own view cache namespace.
168
 * Note: The final cache file name will then be `prefix_cachefilename`.
169
 */
170
	//Configure::write('Cache.viewPrefix', 'prefix');
171
 
172
/**
173
 * Session configuration.
174
 *
175
 * Contains an array of settings to use for session configuration. The defaults key is
176
 * used to define a default preset to use for sessions, any settings declared here will override
177
 * the settings of the default config.
178
 *
179
 * ## Options
180
 *
181
 * - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
182
 * - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
183
 * - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
184
 * - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
185
 *    value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
186
 * - `Session.defaults` - The default configuration set to use as a basis for your session.
187
 *    There are four builtins: php, cake, cache, database.
188
 * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
189
 *    that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
190
 *    to the ini array.
191
 * - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
192
 *    sessionids that change frequently. See CakeSession::$requestCountdown.
193
 * - `Session.ini` - An associative array of additional ini values to set.
194
 *
195
 * The built in defaults are:
196
 *
197
 * - 'php' - Uses settings defined in your php.ini.
198
 * - 'cake' - Saves session files in CakePHP's /tmp directory.
199
 * - 'database' - Uses CakePHP's database sessions.
200
 * - 'cache' - Use the Cache class to save sessions.
201
 *
202
 * To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
203
 * Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
204
 *
205
 * To use database sessions, run the app/Config/Schema/sessions.php schema using
206
 * the cake shell command: cake schema create Sessions
207
 *
208
 */
209
	Configure::write('Session', array(
210
		'defaults' => 'php'
211
	));
212
 
213
/**
214
 * A random string used in security hashing methods.
215
 */
216
	Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
217
 
218
/**
219
 * A random numeric string (digits only) used to encrypt/decrypt strings.
220
 */
221
	Configure::write('Security.cipherSeed', '76859309657453542496749683645');
222
 
223
/**
224
 * Apply timestamps with the last modified time to static assets (js, css, images).
225
 * Will append a query string parameter containing the time the file was modified. This is
226
 * useful for invalidating browser caches.
227
 *
228
 * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
229
 * timestamping regardless of debug value.
230
 */
231
	//Configure::write('Asset.timestamp', true);
232
 
233
/**
234
 * Compress CSS output by removing comments, whitespace, repeating tags, etc.
235
 * This requires a/var/cache directory to be writable by the web server for caching.
236
 * and /vendors/csspp/csspp.php
237
 *
238
 * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
239
 */
240
	//Configure::write('Asset.filter.css', 'css.php');
241
 
242
/**
243
 * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
244
 * output, and setting the config below to the name of the script.
245
 *
246
 * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JsHelper::link().
247
 */
248
	//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
249
 
250
/**
251
 * The class name and database used in CakePHP's
252
 * access control lists.
253
 */
254
	Configure::write('Acl.classname', 'DbAcl');
255
	Configure::write('Acl.database', 'default');
256
 
257
/**
258
 * Uncomment this line and correct your server timezone to fix
259
 * any date & time related errors.
260
 */
261
	//date_default_timezone_set('UTC');
262
 
263
/**
264
 *
265
 * Cache Engine Configuration
266
 * Default settings provided below
267
 *
268
 * File storage engine.
269
 *
270
 * 	 Cache::config('default', array(
271
 *		'engine' => 'File', //[required]
272
 *		'duration' => 3600, //[optional]
273
 *		'probability' => 100, //[optional]
274
 * 		'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
275
 * 		'prefix' => 'cake_', //[optional]  prefix every cache file with this string
276
 * 		'lock' => false, //[optional]  use file locking
277
 * 		'serialize' => true, //[optional]
278
 * 		'mask' => 0664, //[optional]
279
 *	));
280
 *
281
 * APC (http://pecl.php.net/package/APC)
282
 *
283
 * 	 Cache::config('default', array(
284
 *		'engine' => 'Apc', //[required]
285
 *		'duration' => 3600, //[optional]
286
 *		'probability' => 100, //[optional]
287
 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
288
 *	));
289
 *
290
 * Xcache (http://xcache.lighttpd.net/)
291
 *
292
 * 	 Cache::config('default', array(
293
 *		'engine' => 'Xcache', //[required]
294
 *		'duration' => 3600, //[optional]
295
 *		'probability' => 100, //[optional]
296
 *		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
297
 *		'user' => 'user', //user from xcache.admin.user settings
298
 *		'password' => 'password', //plaintext password (xcache.admin.pass)
299
 *	));
300
 *
301
 * Memcache (http://www.danga.com/memcached/)
302
 *
303
 * 	 Cache::config('default', array(
304
 *		'engine' => 'Memcache', //[required]
305
 *		'duration' => 3600, //[optional]
306
 *		'probability' => 100, //[optional]
307
 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
308
 * 		'servers' => array(
309
 * 			'127.0.0.1:11211' // localhost, default port 11211
310
 * 		), //[optional]
311
 * 		'persistent' => true, // [optional] set this to false for non-persistent connections
312
 * 		'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
313
 *	));
314
 *
315
 *  Wincache (http://php.net/wincache)
316
 *
317
 * 	 Cache::config('default', array(
318
 *		'engine' => 'Wincache', //[required]
319
 *		'duration' => 3600, //[optional]
320
 *		'probability' => 100, //[optional]
321
 *		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
322
 *	));
323
 */
324
 
325
/**
326
 * Configure the cache handlers that CakePHP will use for internal
327
 * metadata like class maps, and model schema.
328
 *
329
 * By default File is used, but for improved performance you should use APC.
330
 *
331
 * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
332
 *       Please check the comments in bootstrap.php for more info on the cache engines available
333
 *       and their settings.
334
 */
335
$engine = 'File';
336
 
337
// In development mode, caches should expire quickly.
338
$duration = '+999 days';
339
if (Configure::read('debug') > 0) {
340
	$duration = '+10 seconds';
341
}
342
 
343
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
344
$prefix = 'myapp_';
345
 
346
/**
347
 * Configure the cache used for general framework caching. Path information,
348
 * object listings, and translation cache files are stored with this configuration.
349
 */
350
Cache::config('_cake_core_', array(
351
	'engine' => $engine,
352
	'prefix' => $prefix . 'cake_core_',
353
	'path' => CACHE . 'persistent' . DS,
354
	'serialize' => ($engine === 'File'),
355
	'duration' => $duration
356
));
357
 
358
/**
359
 * Configure the cache for model and datasource caches. This cache configuration
360
 * is used to store schema descriptions, and table listings in connections.
361
 */
362
Cache::config('_cake_model_', array(
363
	'engine' => $engine,
364
	'prefix' => $prefix . 'cake_model_',
365
	'path' => CACHE . 'models' . DS,
366
	'serialize' => ($engine === 'File'),
367
	'duration' => $duration
368
));