Subversion Repositories SmartDukaan

Rev

Rev 19319 | Details | Compare with Previous | Last modification | View Log | RSS feed

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