2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-06-21 16:48:06 +00:00
|
|
|
/**
|
2005-12-23 21:57:26 +00:00
|
|
|
* This is core configuration file.
|
|
|
|
*
|
2007-09-30 07:45:34 +00:00
|
|
|
* Use it to configure core behavior of Cake.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2010-10-03 16:38:58 +00:00
|
|
|
* PHP 5
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2009-11-06 06:46:59 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2010-01-26 19:18:20 +00:00
|
|
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2010-01-26 19:18:20 +00:00
|
|
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2009-11-06 06:00:11 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
2008-10-30 17:30:26 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.app.config
|
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2009-11-06 06:51:51 +00:00
|
|
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
2006-05-26 05:29:17 +00:00
|
|
|
*/
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-02-17 18:38:36 +00:00
|
|
|
/**
|
|
|
|
* CakePHP Debug Level:
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* Production Mode:
|
|
|
|
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* Development Mode:
|
|
|
|
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
|
|
|
* 2: As in 1, but also with full debug messages and SQL output.
|
[1242]
Author: phpnut
Date: 6:19:00 PM, Thursday, October 27, 2005
Message:
removing session directory
[1241]
Author: phpnut
Date: 6:13:46 PM, Thursday, October 27, 2005
Message:
added docblocks and temp error messages when trying to use the unimplemeted database for sessions
[1239]
Author: phpnut
Date: 5:28:57 PM, Thursday, October 27, 2005
Message:
More work on session.
Added config settings to core.php
updated model to allow models without a database table.
[1237]
Author: phpnut
Date: 3:50:27 PM, Thursday, October 27, 2005
Message:
adding directories for sessions
[1235]
Author: phpnut
Date: 3:36:08 AM, Thursday, October 27, 2005
Message:
Typo
[1234]
Author: phpnut
Date: 3:34:07 AM, Thursday, October 27, 2005
Message:
More work on the Session classes and adding the first methods the to Security class
[1233]
Author: phpnut
Date: 3:05:46 AM, Thursday, October 27, 2005
Message:
Start to core security class added.
Moved paths.php to cake/config/
Refactoring Session classes
[1232]
Author: phpnut
Date: 2:20:25 AM, Thursday, October 27, 2005
Message:
More work on the core session class.
Adding session component class.
Added fix for errors messages not working with validation.
Added possible fix for inflector now working on the word status.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1243 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-10-27 23:29:56 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* In production mode, flash messages redirect after a time interval.
|
|
|
|
* In development mode, you need to click the flash message to continue.
|
2005-06-21 16:48:06 +00:00
|
|
|
*/
|
2009-09-18 00:25:44 +00:00
|
|
|
Configure::write('debug', 2);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* CakePHP Log Level:
|
|
|
|
*
|
|
|
|
* In case of Production Mode CakePHP gives you the possibility to continue logging errors.
|
|
|
|
*
|
|
|
|
* The following parameters can be used:
|
|
|
|
* Boolean: Set true/false to activate/deactivate logging
|
|
|
|
* Configure::write('log', true);
|
|
|
|
*
|
|
|
|
* Integer: Use built-in PHP constants to set the error level (see error_reporting)
|
|
|
|
* Configure::write('log', E_ERROR | E_WARNING);
|
|
|
|
* Configure::write('log', E_ALL ^ E_NOTICE);
|
|
|
|
*/
|
|
|
|
Configure::write('log', true);
|
|
|
|
|
2007-12-25 09:08:36 +00:00
|
|
|
/**
|
|
|
|
* Application wide charset encoding
|
|
|
|
*/
|
|
|
|
Configure::write('App.encoding', 'UTF-8');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-10-15 21:56:31 +00:00
|
|
|
/**
|
|
|
|
* To configure CakePHP *not* to use mod_rewrite and to
|
|
|
|
* use CakePHP pretty URLs, remove these .htaccess
|
|
|
|
* files:
|
|
|
|
*
|
|
|
|
* /.htaccess
|
|
|
|
* /app/.htaccess
|
|
|
|
* /app/webroot/.htaccess
|
|
|
|
*
|
|
|
|
* And uncomment the App.baseUrl below:
|
|
|
|
*/
|
|
|
|
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-10-15 21:56:31 +00:00
|
|
|
/**
|
2009-11-13 15:26:57 +00:00
|
|
|
* Uncomment the define below to use CakePHP prefix routes.
|
2007-10-15 21:56:31 +00:00
|
|
|
*
|
2009-11-12 04:03:57 +00:00
|
|
|
* The value of the define determines the names of the routes
|
|
|
|
* and their associated controller actions:
|
2007-10-15 21:56:31 +00:00
|
|
|
*
|
2010-01-15 21:56:26 +00:00
|
|
|
* Set to an array of prefixes you want to use in your application. Use for
|
2009-09-27 04:18:24 +00:00
|
|
|
* admin or other prefixed routes.
|
|
|
|
*
|
|
|
|
* Routing.prefixes = array('admin', 'manager');
|
|
|
|
*
|
|
|
|
* Enables:
|
|
|
|
* `admin_index()` and `/admin/controller/index`
|
|
|
|
* `manager_index()` and `/manager/controller/index`
|
2009-11-13 15:26:57 +00:00
|
|
|
*
|
2009-09-27 04:18:24 +00:00
|
|
|
*/
|
|
|
|
//Configure::write('Routing.prefixes', array('admin'));
|
|
|
|
|
2007-10-01 18:58:35 +00:00
|
|
|
/**
|
2007-10-15 21:56:31 +00:00
|
|
|
* Turn off all caching application-wide.
|
2007-10-01 18:58:35 +00:00
|
|
|
*
|
|
|
|
*/
|
2007-10-15 21:56:31 +00:00
|
|
|
//Configure::write('Cache.disable', true);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-03-12 00:11:40 +00:00
|
|
|
/**
|
2007-10-15 21:56:31 +00:00
|
|
|
* Enable cache checking.
|
|
|
|
*
|
|
|
|
* If set to true, for view caching you must still use the controller
|
2010-04-04 07:14:14 +00:00
|
|
|
* public $cacheAction inside your controllers to define caching settings.
|
|
|
|
* You can either set it controller-wide by setting public $cacheAction = true,
|
2007-10-15 21:56:31 +00:00
|
|
|
* or in each action using $this->cacheAction = true.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2006-03-12 00:11:40 +00:00
|
|
|
*/
|
2007-10-15 21:56:31 +00:00
|
|
|
//Configure::write('Cache.check', true);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-02-08 15:25:34 +00:00
|
|
|
/**
|
2007-04-30 06:01:54 +00:00
|
|
|
* Defines the default error type when using the log() function. Used for
|
2007-02-17 18:38:36 +00:00
|
|
|
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
|
2006-02-18 23:42:21 +00:00
|
|
|
*/
|
2006-05-26 05:29:17 +00:00
|
|
|
define('LOG_ERROR', 2);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-02-17 10:12:15 +00:00
|
|
|
/**
|
2010-07-25 22:17:33 +00:00
|
|
|
* Session configuration.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* Contains an array of settings to use for session configuration. The defaults key is
|
|
|
|
* used to define a default preset to use for sessions, any settings declared here will override
|
|
|
|
* the settings of the default config.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* ## Options
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.name` - The name of the cookie to use. Defaults to 'CAKEPHP'
|
|
|
|
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
|
|
|
|
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
|
2010-11-01 01:56:59 +00:00
|
|
|
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
|
|
|
|
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.defaults` - The default configuration set to use as a basis for your session.
|
|
|
|
* There are four builtins: php, cake, cache, database.
|
|
|
|
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
|
|
|
|
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
|
|
|
|
* to the ini array.
|
2010-07-27 02:42:00 +00:00
|
|
|
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
|
|
|
|
* sessionids that change frequently. See CakeSession::$requestCountdown.
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.ini` - An associative array of additional ini values to set.
|
2009-04-15 00:12:44 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* The built in defaults are:
|
2009-04-15 00:12:44 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* - 'php' -Uses settings defined in your php.ini.
|
|
|
|
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
|
|
|
* - 'database' - Uses CakePHP's database sessions.
|
|
|
|
* - 'cache' - Use the Cache class to save sessions.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* To define a custom session handler, save it at /app/libs/session/<name>.php.
|
|
|
|
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* To use database sessions, run the app/config/schema/sessions.php schema using
|
|
|
|
* the cake shell command: cake schema create Sessions
|
2010-05-06 13:35:38 +00:00
|
|
|
*
|
2007-10-17 00:40:47 +00:00
|
|
|
*/
|
2010-07-25 22:17:33 +00:00
|
|
|
Configure::write('Session', array(
|
|
|
|
'defaults' => 'php'
|
|
|
|
));
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-10-17 00:40:47 +00:00
|
|
|
/**
|
2010-07-25 22:17:33 +00:00
|
|
|
* The level of CakePHP security.
|
[1242]
Author: phpnut
Date: 6:19:00 PM, Thursday, October 27, 2005
Message:
removing session directory
[1241]
Author: phpnut
Date: 6:13:46 PM, Thursday, October 27, 2005
Message:
added docblocks and temp error messages when trying to use the unimplemeted database for sessions
[1239]
Author: phpnut
Date: 5:28:57 PM, Thursday, October 27, 2005
Message:
More work on session.
Added config settings to core.php
updated model to allow models without a database table.
[1237]
Author: phpnut
Date: 3:50:27 PM, Thursday, October 27, 2005
Message:
adding directories for sessions
[1235]
Author: phpnut
Date: 3:36:08 AM, Thursday, October 27, 2005
Message:
Typo
[1234]
Author: phpnut
Date: 3:34:07 AM, Thursday, October 27, 2005
Message:
More work on the Session classes and adding the first methods the to Security class
[1233]
Author: phpnut
Date: 3:05:46 AM, Thursday, October 27, 2005
Message:
Start to core security class added.
Moved paths.php to cake/config/
Refactoring Session classes
[1232]
Author: phpnut
Date: 2:20:25 AM, Thursday, October 27, 2005
Message:
More work on the core session class.
Adding session component class.
Added fix for errors messages not working with validation.
Added possible fix for inflector now working on the word status.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1243 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-10-27 23:29:56 +00:00
|
|
|
*/
|
2009-12-13 00:59:14 +00:00
|
|
|
Configure::write('Security.level', 'medium');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-01-17 05:13:38 +00:00
|
|
|
/**
|
2007-10-17 00:40:47 +00:00
|
|
|
* A random string used in security hashing methods.
|
2006-01-17 05:13:38 +00:00
|
|
|
*/
|
2009-12-13 15:36:51 +00:00
|
|
|
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2010-01-15 21:56:26 +00:00
|
|
|
/**
|
|
|
|
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
|
|
|
*/
|
2010-01-19 19:53:20 +00:00
|
|
|
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
|
2010-01-15 21:56:26 +00:00
|
|
|
|
2009-11-21 18:26:33 +00:00
|
|
|
/**
|
|
|
|
* Apply timestamps with the last modified time to static assets (js, css, images).
|
2009-11-21 21:25:39 +00:00
|
|
|
* Will append a querystring parameter containing the time the file was modified. This is
|
2009-11-21 18:26:33 +00:00
|
|
|
* useful for invalidating browser caches.
|
|
|
|
*
|
|
|
|
* Set to `true` to apply timestamps, when debug = 0, or set to 'force' to always enable
|
|
|
|
* timestamping.
|
|
|
|
*/
|
|
|
|
//Configure::write('Asset.timestamp', true);
|
2005-06-21 16:48:06 +00:00
|
|
|
/**
|
2007-02-17 18:38:36 +00:00
|
|
|
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
|
|
|
* This requires a/var/cache directory to be writable by the web server for caching.
|
2007-11-22 17:57:57 +00:00
|
|
|
* and /vendors/csspp/csspp.php
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-11-22 17:57:57 +00:00
|
|
|
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
2005-06-21 16:48:06 +00:00
|
|
|
*/
|
2007-12-31 05:19:00 +00:00
|
|
|
//Configure::write('Asset.filter.css', 'css.php');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-12-31 05:19:00 +00:00
|
|
|
/**
|
|
|
|
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
|
|
|
* output, and setting the config below to the name of the script.
|
|
|
|
*
|
|
|
|
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
|
|
|
|
*/
|
|
|
|
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
2007-07-31 14:04:18 +00:00
|
|
|
* The classname and database used in CakePHP's
|
2007-02-17 18:38:36 +00:00
|
|
|
* access control lists.
|
2005-08-21 06:49:02 +00:00
|
|
|
*/
|
2008-05-22 02:00:36 +00:00
|
|
|
Configure::write('Acl.classname', 'DbAcl');
|
2007-10-14 01:09:21 +00:00
|
|
|
Configure::write('Acl.database', 'default');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2009-07-31 15:48:30 +00:00
|
|
|
/**
|
|
|
|
* If you are on PHP 5.3 uncomment this line and correct your server timezone
|
|
|
|
* to fix the date & time related errors.
|
|
|
|
*/
|
|
|
|
//date_default_timezone_set('UTC');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-04-30 07:47:14 +00:00
|
|
|
/**
|
2008-06-02 17:35:56 +00:00
|
|
|
*
|
2007-09-30 07:45:34 +00:00
|
|
|
* Cache Engine Configuration
|
2008-06-02 17:35:56 +00:00
|
|
|
* Default settings provided below
|
2007-09-30 07:45:34 +00:00
|
|
|
*
|
|
|
|
* File storage engine.
|
2008-06-02 17:35:56 +00:00
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
2008-06-23 22:58:06 +00:00
|
|
|
* 'engine' => 'File', //[required]
|
2008-06-02 17:35:56 +00:00
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
|
|
|
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
|
|
|
* 'lock' => false, //[optional] use file locking
|
|
|
|
* 'serialize' => true, [optional]
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* APC (http://pecl.php.net/package/APC)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
2008-06-23 22:58:06 +00:00
|
|
|
* 'engine' => 'Apc', //[required]
|
2008-06-02 17:35:56 +00:00
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Xcache (http://xcache.lighttpd.net/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
2008-06-23 22:58:06 +00:00
|
|
|
* 'engine' => 'Xcache', //[required]
|
2008-06-02 17:35:56 +00:00
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'user' => 'user', //user from xcache.admin.user settings
|
|
|
|
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Memcache (http://www.danga.com/memcached/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
2008-06-23 22:58:06 +00:00
|
|
|
* 'engine' => 'Memcache', //[required]
|
2008-06-02 17:35:56 +00:00
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'servers' => array(
|
|
|
|
* '127.0.0.1:11211' // localhost, default port 11211
|
|
|
|
* ), //[optional]
|
|
|
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
|
|
|
* ));
|
|
|
|
*
|
2007-10-14 01:09:21 +00:00
|
|
|
*/
|
|
|
|
Cache::config('default', array('engine' => 'File'));
|