PageRenderTime 54ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/config/core.php

https://github.com/felixding/LonelyThinker
PHP | 241 lines | 18 code | 1 blank | 222 comment | 0 complexity | e9e214e91ae809dd88c731e25070ef35 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /* SVN FILE: $Id: core.php 11 2009-04-24 04:02:49Z $ */
  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: 11 $
  23. * @modifiedby $LastChangedBy: $
  24. * @lastmodified $Date: 2009-04-24 12:02:49 +0800 (Fri, 24 Apr 2009) $
  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. * Minify JS/CSS
  48. */
  49. Configure::write('Asset.jsPath', 'js');
  50. Configure::write('Asset.cssPath', 'css');
  51. /**
  52. * Localization
  53. */
  54. //Configure::write('Config.language', "zh_cn");
  55. //Configure::write('Config.language', "en");
  56. /**
  57. * timezone for Asia/Shanghai
  58. */
  59. date_default_timezone_set ('Asia/Shanghai');
  60. /**
  61. * To configure CakePHP *not* to use mod_rewrite and to
  62. * use CakePHP pretty URLs, remove these .htaccess
  63. * files:
  64. *
  65. * /.htaccess
  66. * /app/.htaccess
  67. * /app/webroot/.htaccess
  68. *
  69. * And uncomment the App.baseUrl below:
  70. */
  71. //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
  72. /**
  73. * Uncomment the define below to use CakePHP admin routes.
  74. *
  75. * The value of the define determines the name of the route
  76. * and its associated controller actions:
  77. *
  78. * 'admin' -> admin_index() and /admin/controller/index
  79. * 'superuser' -> superuser_index() and /superuser/controller/index
  80. */
  81. //Configure::write('Routing.admin', 'admin');
  82. /**
  83. * Turn off all caching application-wide.
  84. *
  85. */
  86. //Configure::write('Cache.disable', true);
  87. /**
  88. * Enable cache checking.
  89. *
  90. * If set to true, for view caching you must still use the controller
  91. * var $cacheAction inside your controllers to define caching settings.
  92. * You can either set it controller-wide by setting var $cacheAction = true,
  93. * or in each action using $this->cacheAction = true.
  94. *
  95. */
  96. //Configure::write('Cache.check', true);
  97. /**
  98. * Defines the default error type when using the log() function. Used for
  99. * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
  100. */
  101. define('LOG_ERROR', 0);
  102. /**
  103. * The preferred session handling method. Valid values:
  104. *
  105. * 'php' Uses settings defined in your php.ini.
  106. * 'cake' Saves session files in CakePHP's /tmp directory.
  107. * 'database' Uses CakePHP's database sessions.
  108. *
  109. * To define a custom session handler, save it at /app/config/<name>.php.
  110. * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
  111. *
  112. * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
  113. *
  114. */
  115. Configure::write('Session.save', 'php');
  116. /**
  117. * The name of the table used to store CakePHP database sessions.
  118. *
  119. * 'Session.save' must be set to 'database' in order to utilize this constant.
  120. *
  121. * The table name set here should *not* include any table prefix defined elsewhere.
  122. */
  123. //Configure::write('Session.table', 'cake_sessions');
  124. /**
  125. * The DATABASE_CONFIG::$var to use for database session handling.
  126. *
  127. * 'Session.save' must be set to 'database' in order to utilize this constant.
  128. */
  129. //Configure::write('Session.database', 'default');
  130. /**
  131. * The name of CakePHP's session cookie.
  132. */
  133. Configure::write('Session.cookie', 'CAKEPHP');
  134. /**
  135. * Session time out time (in seconds).
  136. * Actual value depends on 'Security.level' setting.
  137. */
  138. Configure::write('Session.timeout', '120');
  139. /**
  140. * If set to false, sessions are not automatically started.
  141. */
  142. Configure::write('Session.start', true);
  143. /**
  144. * When set to false, HTTP_USER_AGENT will not be checked
  145. * in the session
  146. */
  147. Configure::write('Session.checkAgent', true);
  148. /**
  149. * The level of CakePHP security. The session timeout time defined
  150. * in 'Session.timeout' is multiplied according to the settings here.
  151. * Valid values:
  152. *
  153. * 'high' Session timeout in 'Session.timeout' x 10
  154. * 'medium' Session timeout in 'Session.timeout' x 100
  155. * 'low' Session timeout in 'Session.timeout' x 300
  156. *
  157. * CakePHP session IDs are also regenerated between requests if
  158. * 'Security.level' is set to 'high'.
  159. */
  160. Configure::write('Security.level', 'high');
  161. /**
  162. * A random string used in security hashing methods.
  163. */
  164. Configure::write('Security.salt', 'aaDYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
  165. /**
  166. * Compress CSS output by removing comments, whitespace, repeating tags, etc.
  167. * This requires a/var/cache directory to be writable by the web server for caching.
  168. * and /vendors/csspp/csspp.php
  169. *
  170. * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
  171. */
  172. //Configure::write('Asset.filter.css', 'css.php');
  173. /**
  174. * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
  175. * output, and setting the config below to the name of the script.
  176. *
  177. * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
  178. */
  179. //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
  180. /**
  181. * The classname and database used in CakePHP's
  182. * access control lists.
  183. */
  184. Configure::write('Acl.classname', 'DbAcl');
  185. Configure::write('Acl.database', 'default');
  186. /**
  187. *
  188. * Cache Engine Configuration
  189. * Default settings provided below
  190. *
  191. * File storage engine.
  192. *
  193. * Cache::config('default', array(
  194. * 'engine' => 'File', //[required]
  195. * 'duration'=> 3600, //[optional]
  196. * 'probability'=> 100, //[optional]
  197. * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
  198. * 'prefix' => 'cake_', //[optional] prefix every cache file with this string
  199. * 'lock' => false, //[optional] use file locking
  200. * 'serialize' => true, [optional]
  201. * ));
  202. *
  203. *
  204. * APC (http://pecl.php.net/package/APC)
  205. *
  206. * Cache::config('default', array(
  207. * 'engine' => 'Apc', //[required]
  208. * 'duration'=> 3600, //[optional]
  209. * 'probability'=> 100, //[optional]
  210. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  211. * ));
  212. *
  213. * Xcache (http://xcache.lighttpd.net/)
  214. *
  215. * Cache::config('default', array(
  216. * 'engine' => 'Xcache', //[required]
  217. * 'duration'=> 3600, //[optional]
  218. * 'probability'=> 100, //[optional]
  219. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  220. * 'user' => 'user', //user from xcache.admin.user settings
  221. * 'password' => 'password', //plaintext password (xcache.admin.pass)
  222. * ));
  223. *
  224. *
  225. * Memcache (http://www.danga.com/memcached/)
  226. *
  227. * Cache::config('default', array(
  228. * 'engine' => 'Memcache', //[required]
  229. * 'duration'=> 3600, //[optional]
  230. * 'probability'=> 100, //[optional]
  231. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  232. * 'servers' => array(
  233. * '127.0.0.1:11211' // localhost, default port 11211
  234. * ), //[optional]
  235. * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  236. * ));
  237. *
  238. */
  239. Cache::config('default', array('engine' => 'File'));
  240. ?>