| 1 |
lars |
1 |
<?php
|
|
|
2 |
/* SVN FILE: $Id: core.php 7945 2008-12-19 02:16:01Z gwoo $ */
|
|
|
3 |
/**
|
|
|
4 |
* This is core configuration file.
|
|
|
5 |
*
|
|
|
6 |
* Use it to configure core behavior of Cake.
|
|
|
7 |
*
|
|
|
8 |
* PHP versions 4 and 5
|
|
|
9 |
*
|
|
|
10 |
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
|
|
11 |
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
12 |
*
|
|
|
13 |
* Licensed under The MIT License
|
|
|
14 |
* Redistributions of files must retain the above copyright notice.
|
|
|
15 |
*
|
|
|
16 |
* @filesource
|
|
|
17 |
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
18 |
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
|
|
19 |
* @package cake
|
|
|
20 |
* @subpackage cake.app.config
|
|
|
21 |
* @since CakePHP(tm) v 0.2.9
|
|
|
22 |
* @version $Revision: 7945 $
|
|
|
23 |
* @modifiedby $LastChangedBy: gwoo $
|
|
|
24 |
* @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
|
|
|
25 |
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
|
|
26 |
*/
|
|
|
27 |
/**
|
|
|
28 |
* CakePHP Debug Level:
|
|
|
29 |
*
|
|
|
30 |
* Production Mode:
|
|
|
31 |
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
|
|
32 |
*
|
|
|
33 |
* Development Mode:
|
|
|
34 |
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
|
|
35 |
* 2: As in 1, but also with full debug messages and SQL output.
|
|
|
36 |
* 3: As in 2, but also with full controller dump.
|
|
|
37 |
*
|
|
|
38 |
* In production mode, flash messages redirect after a time interval.
|
|
|
39 |
* In development mode, you need to click the flash message to continue.
|
|
|
40 |
*/
|
|
|
41 |
Configure::write('debug', 2);
|
|
|
42 |
/**
|
|
|
43 |
* Application wide charset encoding
|
|
|
44 |
*/
|
|
|
45 |
Configure::write('App.encoding', 'UTF-8');
|
|
|
46 |
/**
|
|
|
47 |
* To configure CakePHP *not* to use mod_rewrite and to
|
|
|
48 |
* use CakePHP pretty URLs, remove these .htaccess
|
|
|
49 |
* files:
|
|
|
50 |
*
|
|
|
51 |
* /.htaccess
|
|
|
52 |
* /app/.htaccess
|
|
|
53 |
* /app/webroot/.htaccess
|
|
|
54 |
*
|
|
|
55 |
* And uncomment the App.baseUrl below:
|
|
|
56 |
*/
|
|
|
57 |
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
|
|
58 |
/**
|
|
|
59 |
* Uncomment the define below to use CakePHP admin routes.
|
|
|
60 |
*
|
|
|
61 |
* The value of the define determines the name of the route
|
|
|
62 |
* and its associated controller actions:
|
|
|
63 |
*
|
|
|
64 |
* 'admin' -> admin_index() and /admin/controller/index
|
|
|
65 |
* 'superuser' -> superuser_index() and /superuser/controller/index
|
|
|
66 |
*/
|
|
|
67 |
//Configure::write('Routing.admin', 'admin');
|
|
|
68 |
|
|
|
69 |
/**
|
|
|
70 |
* Turn off all caching application-wide.
|
|
|
71 |
*
|
|
|
72 |
*/
|
|
|
73 |
//Configure::write('Cache.disable', true);
|
|
|
74 |
/**
|
|
|
75 |
* Enable cache checking.
|
|
|
76 |
*
|
|
|
77 |
* If set to true, for view caching you must still use the controller
|
|
|
78 |
* var $cacheAction inside your controllers to define caching settings.
|
|
|
79 |
* You can either set it controller-wide by setting var $cacheAction = true,
|
|
|
80 |
* or in each action using $this->cacheAction = true.
|
|
|
81 |
*
|
|
|
82 |
*/
|
|
|
83 |
//Configure::write('Cache.check', true);
|
|
|
84 |
/**
|
|
|
85 |
* Defines the default error type when using the log() function. Used for
|
|
|
86 |
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
|
|
|
87 |
*/
|
|
|
88 |
define('LOG_ERROR', 2);
|
|
|
89 |
/**
|
|
|
90 |
* The preferred session handling method. Valid values:
|
|
|
91 |
*
|
|
|
92 |
* 'php' Uses settings defined in your php.ini.
|
|
|
93 |
* 'cake' Saves session files in CakePHP's /tmp directory.
|
|
|
94 |
* 'database' Uses CakePHP's database sessions.
|
|
|
95 |
*
|
|
|
96 |
* To define a custom session handler, save it at /app/config/<name>.php.
|
|
|
97 |
* Set the value of 'Session.save' to <name> to utilize it in CakePHP.
|
|
|
98 |
*
|
|
|
99 |
* To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
|
|
|
100 |
*
|
|
|
101 |
*/
|
|
|
102 |
Configure::write('Session.save', 'php');
|
|
|
103 |
/**
|
|
|
104 |
* The name of the table used to store CakePHP database sessions.
|
|
|
105 |
*
|
|
|
106 |
* 'Session.save' must be set to 'database' in order to utilize this constant.
|
|
|
107 |
*
|
|
|
108 |
* The table name set here should *not* include any table prefix defined elsewhere.
|
|
|
109 |
*/
|
|
|
110 |
//Configure::write('Session.table', 'cake_sessions');
|
|
|
111 |
/**
|
|
|
112 |
* The DATABASE_CONFIG::$var to use for database session handling.
|
|
|
113 |
*
|
|
|
114 |
* 'Session.save' must be set to 'database' in order to utilize this constant.
|
|
|
115 |
*/
|
|
|
116 |
//Configure::write('Session.database', 'default');
|
|
|
117 |
/**
|
|
|
118 |
* The name of CakePHP's session cookie.
|
|
|
119 |
*/
|
|
|
120 |
Configure::write('Session.cookie', 'CAKEPHP');
|
|
|
121 |
/**
|
|
|
122 |
* Session time out time (in seconds).
|
|
|
123 |
* Actual value depends on 'Security.level' setting.
|
|
|
124 |
*/
|
|
|
125 |
Configure::write('Session.timeout', '120');
|
|
|
126 |
/**
|
|
|
127 |
* If set to false, sessions are not automatically started.
|
|
|
128 |
*/
|
|
|
129 |
Configure::write('Session.start', true);
|
|
|
130 |
/**
|
|
|
131 |
* When set to false, HTTP_USER_AGENT will not be checked
|
|
|
132 |
* in the session
|
|
|
133 |
*/
|
|
|
134 |
Configure::write('Session.checkAgent', true);
|
|
|
135 |
/**
|
|
|
136 |
* The level of CakePHP security. The session timeout time defined
|
|
|
137 |
* in 'Session.timeout' is multiplied according to the settings here.
|
|
|
138 |
* Valid values:
|
|
|
139 |
*
|
|
|
140 |
* 'high' Session timeout in 'Session.timeout' x 10
|
|
|
141 |
* 'medium' Session timeout in 'Session.timeout' x 100
|
|
|
142 |
* 'low' Session timeout in 'Session.timeout' x 300
|
|
|
143 |
*
|
|
|
144 |
* CakePHP session IDs are also regenerated between requests if
|
|
|
145 |
* 'Security.level' is set to 'high'.
|
|
|
146 |
*/
|
|
|
147 |
Configure::write('Security.level', 'high');
|
|
|
148 |
/**
|
|
|
149 |
* A random string used in security hashing methods.
|
|
|
150 |
*/
|
|
|
151 |
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
|
|
152 |
/**
|
|
|
153 |
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
|
|
154 |
* This requires a/var/cache directory to be writable by the web server for caching.
|
|
|
155 |
* and /vendors/csspp/csspp.php
|
|
|
156 |
*
|
|
|
157 |
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
|
|
158 |
*/
|
|
|
159 |
//Configure::write('Asset.filter.css', 'css.php');
|
|
|
160 |
/**
|
|
|
161 |
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
|
|
162 |
* output, and setting the config below to the name of the script.
|
|
|
163 |
*
|
|
|
164 |
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
|
|
|
165 |
*/
|
|
|
166 |
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
|
|
167 |
/**
|
|
|
168 |
* The classname and database used in CakePHP's
|
|
|
169 |
* access control lists.
|
|
|
170 |
*/
|
|
|
171 |
Configure::write('Acl.classname', 'DbAcl');
|
|
|
172 |
Configure::write('Acl.database', 'default');
|
|
|
173 |
/**
|
|
|
174 |
*
|
|
|
175 |
* Cache Engine Configuration
|
|
|
176 |
* Default settings provided below
|
|
|
177 |
*
|
|
|
178 |
* File storage engine.
|
|
|
179 |
*
|
|
|
180 |
* Cache::config('default', array(
|
|
|
181 |
* 'engine' => 'File', //[required]
|
|
|
182 |
* 'duration'=> 3600, //[optional]
|
|
|
183 |
* 'probability'=> 100, //[optional]
|
|
|
184 |
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
|
|
185 |
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
|
|
186 |
* 'lock' => false, //[optional] use file locking
|
|
|
187 |
* 'serialize' => true, [optional]
|
|
|
188 |
* ));
|
|
|
189 |
*
|
|
|
190 |
*
|
|
|
191 |
* APC (http://pecl.php.net/package/APC)
|
|
|
192 |
*
|
|
|
193 |
* Cache::config('default', array(
|
|
|
194 |
* 'engine' => 'Apc', //[required]
|
|
|
195 |
* 'duration'=> 3600, //[optional]
|
|
|
196 |
* 'probability'=> 100, //[optional]
|
|
|
197 |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
198 |
* ));
|
|
|
199 |
*
|
|
|
200 |
* Xcache (http://xcache.lighttpd.net/)
|
|
|
201 |
*
|
|
|
202 |
* Cache::config('default', array(
|
|
|
203 |
* 'engine' => 'Xcache', //[required]
|
|
|
204 |
* 'duration'=> 3600, //[optional]
|
|
|
205 |
* 'probability'=> 100, //[optional]
|
|
|
206 |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
207 |
* 'user' => 'user', //user from xcache.admin.user settings
|
|
|
208 |
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
|
|
209 |
* ));
|
|
|
210 |
*
|
|
|
211 |
*
|
|
|
212 |
* Memcache (http://www.danga.com/memcached/)
|
|
|
213 |
*
|
|
|
214 |
* Cache::config('default', array(
|
|
|
215 |
* 'engine' => 'Memcache', //[required]
|
|
|
216 |
* 'duration'=> 3600, //[optional]
|
|
|
217 |
* 'probability'=> 100, //[optional]
|
|
|
218 |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
219 |
* 'servers' => array(
|
|
|
220 |
* '127.0.0.1:11211' // localhost, default port 11211
|
|
|
221 |
* ), //[optional]
|
|
|
222 |
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
|
|
223 |
* ));
|
|
|
224 |
*
|
|
|
225 |
*/
|
|
|
226 |
Cache::config('default', array('engine' => 'File'));
|
|
|
227 |
?>
|