PageRenderTime 25ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/config/core.php

https://gitlab.com/captain4ever/ufriend_php
PHP | 302 lines | 16 code | 24 blank | 262 comment | 0 complexity | b8006bb0f11297b25657e07537ec03df MD5 | raw file
  1. <?php
  2. /**
  3. * This is core configuration file.
  4. *
  5. * Use it to configure core behavior of Cake.
  6. *
  7. * PHP versions 4 and 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package cake
  18. * @subpackage cake.app.config
  19. * @since CakePHP(tm) v 0.2.9
  20. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  21. */
  22. /**
  23. * CakePHP Debug Level:
  24. *
  25. * Production Mode:
  26. * 0: No error messages, errors, or warnings shown. Flash messages redirect.
  27. *
  28. * Development Mode:
  29. * 1: Errors and warnings shown, model caches refreshed, flash messages halted.
  30. * 2: As in 1, but also with full debug messages and SQL output.
  31. *
  32. * In production mode, flash messages redirect after a time interval.
  33. * In development mode, you need to click the flash message to continue.
  34. */
  35. Configure::write('debug', 2);
  36. /**
  37. * CakePHP Log Level:
  38. *
  39. * In case of Production Mode CakePHP gives you the possibility to continue logging errors.
  40. *
  41. * The following parameters can be used:
  42. * Boolean: Set true/false to activate/deactivate logging
  43. * Configure::write('log', true);
  44. *
  45. * Integer: Use built-in PHP constants to set the error level (see error_reporting)
  46. * Configure::write('log', E_ERROR | E_WARNING);
  47. * Configure::write('log', E_ALL ^ E_NOTICE);
  48. */
  49. Configure::write('log', true);
  50. /**
  51. * Application wide charset encoding
  52. */
  53. Configure::write('App.encoding', 'UTF-8');
  54. /**
  55. * To configure CakePHP *not* to use mod_rewrite and to
  56. * use CakePHP pretty URLs, remove these .htaccess
  57. * files:
  58. *
  59. * /.htaccess
  60. * /app/.htaccess
  61. * /app/webroot/.htaccess
  62. *
  63. * And uncomment the App.baseUrl below:
  64. */
  65. //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
  66. /**
  67. * Uncomment the define below to use CakePHP prefix routes.
  68. *
  69. * The value of the define determines the names of the routes
  70. * and their associated controller actions:
  71. *
  72. * Set to an array of prefixes you want to use in your application. Use for
  73. * admin or other prefixed routes.
  74. *
  75. * Routing.prefixes = array('admin', 'manager');
  76. *
  77. * Enables:
  78. * `admin_index()` and `/admin/controller/index`
  79. * `manager_index()` and `/manager/controller/index`
  80. *
  81. * [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead]
  82. */
  83. //Configure::write('Routing.prefixes', array('admin'));
  84. /**
  85. * Turn off all caching application-wide.
  86. *
  87. */
  88. //Configure::write('Cache.disable', true);
  89. /**
  90. * Enable cache checking.
  91. *
  92. * If set to true, for view caching you must still use the controller
  93. * var $cacheAction inside your controllers to define caching settings.
  94. * You can either set it controller-wide by setting var $cacheAction = true,
  95. * or in each action using $this->cacheAction = true.
  96. *
  97. */
  98. //Configure::write('Cache.check', true);
  99. /**
  100. * Defines the default error type when using the log() function. Used for
  101. * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
  102. */
  103. define('LOG_ERROR', 2);
  104. /**
  105. * The preferred session handling method. Valid values:
  106. *
  107. * 'php' Uses settings defined in your php.ini.
  108. * 'cake' Saves session files in CakePHP's /tmp directory.
  109. * 'database' Uses CakePHP's database sessions.
  110. *
  111. * To define a custom session handler, save it at /app/config/<name>.php.
  112. * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
  113. *
  114. * To use database sessions, run the app/config/schema/sessions.php schema using
  115. * the cake shell command: cake schema run create Sessions
  116. *
  117. */
  118. Configure::write('Session.save', 'php');
  119. /**
  120. * The model name to be used for the session model.
  121. *
  122. * 'Session.save' must be set to 'database' in order to utilize this constant.
  123. *
  124. * The model name set here should *not* be used elsewhere in your application.
  125. */
  126. //Configure::write('Session.model', 'Session');
  127. /**
  128. * The name of the table used to store CakePHP database sessions.
  129. *
  130. * 'Session.save' must be set to 'database' in order to utilize this constant.
  131. *
  132. * The table name set here should *not* include any table prefix defined elsewhere.
  133. *
  134. * Please note that if you set a value for Session.model (above), any value set for
  135. * Session.table will be ignored.
  136. *
  137. * [Note: Session.table is deprecated as of CakePHP 1.3]
  138. */
  139. //Configure::write('Session.table', 'cake_sessions');
  140. /**
  141. * The DATABASE_CONFIG::$var to use for database session handling.
  142. *
  143. * 'Session.save' must be set to 'database' in order to utilize this constant.
  144. */
  145. //Configure::write('Session.database', 'default');
  146. /**
  147. * The name of CakePHP's session cookie.
  148. *
  149. * Note the guidelines for Session names states: "The session name references
  150. * the session id in cookies and URLs. It should contain only alphanumeric
  151. * characters."
  152. * @link http://php.net/session_name
  153. */
  154. Configure::write('Session.cookie', 'CAKEPHP');
  155. /**
  156. * Session time out time (in minutes).
  157. * Actual value depends on 'Security.level' setting.
  158. */
  159. Configure::write('Session.timeout', '120');
  160. /**
  161. * If set to false, sessions are not automatically started.
  162. */
  163. Configure::write('Session.start', true);
  164. /**
  165. * When set to false, HTTP_USER_AGENT will not be checked
  166. * in the session
  167. */
  168. Configure::write('Session.checkAgent', true);
  169. /**
  170. * The level of CakePHP security. The session timeout time defined
  171. * in 'Session.timeout' is multiplied according to the settings here.
  172. * Valid values:
  173. *
  174. * 'high' Session timeout in 'Session.timeout' x 10
  175. * 'medium' Session timeout in 'Session.timeout' x 100
  176. * 'low' Session timeout in 'Session.timeout' x 300
  177. *
  178. * CakePHP session IDs are also regenerated between requests if
  179. * 'Security.level' is set to 'high'.
  180. */
  181. Configure::write('Security.level', 'medium');
  182. /**
  183. * A random string used in security hashing methods.
  184. */
  185. Configure::write('Security.salt', '2a8042b731508ff660e9d6be893e425b1015b1e7');
  186. /**
  187. * A random numeric string (digits only) used to encrypt/decrypt strings.
  188. */
  189. Configure::write('Security.cipherSeed', '393861666331636438323038396561');
  190. /**
  191. * Apply timestamps with the last modified time to static assets (js, css, images).
  192. * Will append a querystring parameter containing the time the file was modified. This is
  193. * useful for invalidating browser caches.
  194. *
  195. * Set to `true` to apply timestamps, when debug = 0, or set to 'force' to always enable
  196. * timestamping.
  197. */
  198. //Configure::write('Asset.timestamp', true);
  199. /**
  200. * Compress CSS output by removing comments, whitespace, repeating tags, etc.
  201. * This requires a/var/cache directory to be writable by the web server for caching.
  202. * and /vendors/csspp/csspp.php
  203. *
  204. * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
  205. */
  206. //Configure::write('Asset.filter.css', 'css.php');
  207. /**
  208. * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
  209. * output, and setting the config below to the name of the script.
  210. *
  211. * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
  212. */
  213. //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
  214. /**
  215. * The classname and database used in CakePHP's
  216. * access control lists.
  217. */
  218. Configure::write('Acl.classname', 'DbAcl');
  219. Configure::write('Acl.database', 'default');
  220. /**
  221. * If you are on PHP 5.3 uncomment this line and correct your server timezone
  222. * to fix the date & time related errors.
  223. */
  224. //date_default_timezone_set('UTC');
  225. /**
  226. *
  227. * Cache Engine Configuration
  228. * Default settings provided below
  229. *
  230. * File storage engine.
  231. *
  232. * Cache::config('default', array(
  233. * 'engine' => 'File', //[required]
  234. * 'duration'=> 3600, //[optional]
  235. * 'probability'=> 100, //[optional]
  236. * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
  237. * 'prefix' => 'cake_', //[optional] prefix every cache file with this string
  238. * 'lock' => false, //[optional] use file locking
  239. * 'serialize' => true, [optional]
  240. * ));
  241. *
  242. *
  243. * APC (http://pecl.php.net/package/APC)
  244. *
  245. * Cache::config('default', array(
  246. * 'engine' => 'Apc', //[required]
  247. * 'duration'=> 3600, //[optional]
  248. * 'probability'=> 100, //[optional]
  249. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  250. * ));
  251. *
  252. * Xcache (http://xcache.lighttpd.net/)
  253. *
  254. * Cache::config('default', array(
  255. * 'engine' => 'Xcache', //[required]
  256. * 'duration'=> 3600, //[optional]
  257. * 'probability'=> 100, //[optional]
  258. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  259. * 'user' => 'user', //user from xcache.admin.user settings
  260. * 'password' => 'password', //plaintext password (xcache.admin.pass)
  261. * ));
  262. *
  263. *
  264. * Memcache (http://www.danga.com/memcached/)
  265. *
  266. * Cache::config('default', array(
  267. * 'engine' => 'Memcache', //[required]
  268. * 'duration'=> 3600, //[optional]
  269. * 'probability'=> 100, //[optional]
  270. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  271. * 'servers' => array(
  272. * '127.0.0.1:11211' // localhost, default port 11211
  273. * ), //[optional]
  274. * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  275. * ));
  276. *
  277. */
  278. Cache::config('default', array('engine' => 'File'));