config.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <?php
  2. /**
  3. * Part of the Fuel framework.
  4. *
  5. * @package Fuel
  6. * @version 1.5
  7. * @author Fuel Development Team
  8. * @license MIT License
  9. * @copyright 2010 - 2013 Fuel Development Team
  10. * @link http://fuelphp.com
  11. */
  12. /**
  13. * NOTICE:
  14. *
  15. * If you need to make modifications to the default configuration, copy
  16. * this file to your app/config folder, and make them in there.
  17. *
  18. * This will allow you to upgrade fuel without losing your custom config.
  19. */
  20. return array(
  21. /**
  22. * base_url - The base URL of the application.
  23. * MUST contain a trailing slash (/)
  24. *
  25. * You can set this to a full or relative URL:
  26. *
  27. * 'base_url' => '/foo/',
  28. * 'base_url' => 'http://foo.com/'
  29. *
  30. * Set this to null to have it automatically detected.
  31. */
  32. 'base_url' => null,
  33. /**
  34. * url_suffix - Any suffix that needs to be added to
  35. * URL's generated by Fuel. If the suffix is an extension,
  36. * make sure to include the dot
  37. *
  38. * 'url_suffix' => '.html',
  39. *
  40. * Set this to an empty string if no suffix is used
  41. */
  42. 'url_suffix' => '',
  43. /**
  44. * index_file - The name of the main bootstrap file.
  45. *
  46. * Set this to 'index.php if you don't use URL rewriting
  47. */
  48. 'index_file' => false,
  49. 'profiling' => false,
  50. /**
  51. * Default location for the file cache
  52. */
  53. 'cache_dir' => APPPATH.'cache/',
  54. /**
  55. * Settings for the file finder cache (the Cache class has it's own config!)
  56. */
  57. 'caching' => false,
  58. 'cache_lifetime' => 3600, // In Seconds
  59. /**
  60. * Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encoding of output
  61. */
  62. 'ob_callback' => null,
  63. 'errors' => array(
  64. // Which errors should we show, but continue execution? You can add the following:
  65. // E_NOTICE, E_WARNING, E_DEPRECATED, E_STRICT to mimic PHP's default behaviour
  66. // (which is to continue on non-fatal errors). We consider this bad practice.
  67. 'continue_on' => array(),
  68. // How many errors should we show before we stop showing them? (prevents out-of-memory errors)
  69. 'throttle' => 10,
  70. // Should notices from Error::notice() be shown?
  71. 'notices' => true,
  72. ),
  73. /**
  74. * Localization & internationalization settings
  75. */
  76. 'language' => 'en', // Default language
  77. 'language_fallback' => 'en', // Fallback language when file isn't available for default language
  78. 'locale' => 'en_US', // PHP set_locale() setting, null to not set
  79. /**
  80. * Internal string encoding charset
  81. */
  82. 'encoding' => 'UTF-8',
  83. /**
  84. * DateTime settings
  85. *
  86. * server_gmt_offset in seconds the server offset from gmt timestamp when time() is used
  87. * default_timezone optional, if you want to change the server's default timezone
  88. */
  89. 'server_gmt_offset' => 0,
  90. 'default_timezone' => null,
  91. /**
  92. * Logging Threshold. Can be set to any of the following:
  93. *
  94. * Fuel::L_NONE
  95. * Fuel::L_ERROR
  96. * Fuel::L_WARNING
  97. * Fuel::L_DEBUG
  98. * Fuel::L_INFO
  99. * Fuel::L_ALL
  100. */
  101. 'log_threshold' => Fuel::L_WARNING,
  102. 'log_path' => APPPATH.'logs/',
  103. 'log_date_format' => 'Y-m-d H:i:s',
  104. /**
  105. * Security settings
  106. */
  107. 'security' => array(
  108. /**
  109. * If true, every HTTP request of the type speficied in autoload_methods
  110. * will be checked for a CSRF token. If not present or not valid, a
  111. * security exception will be thrown.
  112. */
  113. 'csrf_autoload' => false,
  114. 'csrf_autoload_methods' => array('post', 'put', 'delete'),
  115. /**
  116. * Name of the form field that holds the CSRF token.
  117. */
  118. 'csrf_token_key' => 'fuel_csrf_token',
  119. /**
  120. * Expiry of the token in seconds. If zero, the token remains the same
  121. * for the entire user session.
  122. */
  123. 'csrf_expiration' => 0,
  124. /**
  125. * A salt to make sure the generated security tokens are not predictable
  126. */
  127. 'token_salt' => 'put your salt value here to make the token more secure',
  128. /**
  129. * This input filter can be any normal PHP function as well as 'xss_clean'
  130. *
  131. * WARNING: Using xss_clean will cause a performance hit.
  132. * How much is dependant on how much input data there is.
  133. *
  134. * Note: MUST BE DEFINED IN THE APP CONFIG FILE!
  135. */
  136. //'uri_filter' => array(),
  137. /**
  138. * This input filter can be any normal PHP function as well as 'xss_clean'
  139. *
  140. * WARNING: Using xss_clean will cause a performance hit.
  141. * How much is dependant on how much input data there is.
  142. *
  143. * Note: MUST BE DEFINED IN THE APP CONFIG FILE!
  144. */
  145. //'input_filter' => array(),
  146. /**
  147. * This output filter can be any normal PHP function as well as 'xss_clean'
  148. *
  149. * WARNING: Using xss_clean will cause a performance hit.
  150. * How much is dependant on how much input data there is.
  151. *
  152. * Note: MUST BE DEFINED IN THE APP CONFIG FILE!
  153. */
  154. //'output_filter' => array(),
  155. /**
  156. * Encoding mechanism to use on htmlentities()
  157. */
  158. 'htmlentities_flags' => ENT_QUOTES,
  159. /**
  160. * Wether to encode HTML entities as well
  161. */
  162. 'htmlentities_double_encode' => false,
  163. /**
  164. * Whether to automatically filter view data
  165. */
  166. 'auto_filter_output' => true,
  167. /**
  168. * With output encoding switched on all objects passed will be converted to strings or
  169. * throw exceptions unless they are instances of the classes in this array.
  170. */
  171. 'whitelisted_classes' => array(),
  172. ),
  173. /**
  174. * Cookie settings
  175. */
  176. 'cookie' => array(
  177. // Number of seconds before the cookie expires
  178. 'expiration' => 0,
  179. // Restrict the path that the cookie is available to
  180. 'path' => '/',
  181. // Restrict the domain that the cookie is available to
  182. 'domain' => null,
  183. // Only transmit cookies over secure connections
  184. 'secure' => false,
  185. // Only transmit cookies over HTTP, disabling Javascript access
  186. 'http_only' => false,
  187. ),
  188. /**
  189. * Validation settings
  190. */
  191. 'validation' => array(
  192. /**
  193. * Wether to fallback to global when a value is not found in the input array.
  194. */
  195. 'global_input_fallback' => true,
  196. ),
  197. /**
  198. * Controller class prefix
  199. */
  200. 'controller_prefix' => 'Controller_',
  201. /**
  202. * Routing settings
  203. */
  204. 'routing' => array(
  205. /**
  206. * Whether URI routing is case sensitive or not
  207. */
  208. 'case_sensitive' => true,
  209. /**
  210. * Wether to strip the extension
  211. */
  212. 'strip_extension' => true,
  213. ),
  214. /**
  215. * To enable you to split up your application into modules which can be
  216. * routed by the first uri segment you have to define their basepaths
  217. * here. By default empty, but to use them you can add something
  218. * like this:
  219. * array(APPPATH.'modules'.DS)
  220. *
  221. * Paths MUST end with a directory separator (the DS constant)!
  222. */
  223. 'module_paths' => array(
  224. //APPPATH.'modules'.DS
  225. ),
  226. /**
  227. * To enable you to split up your additions to the framework, packages are
  228. * used. You can define the basepaths for your packages here. By default
  229. * empty, but to use them you can add something like this:
  230. * array(APPPATH.'modules'.DS)
  231. *
  232. * Paths MUST end with a directory separator (the DS constant)!
  233. */
  234. 'package_paths' => array(
  235. //PKGPATH
  236. ),
  237. /**************************************************************************/
  238. /* Always Load */
  239. /**************************************************************************/
  240. 'always_load' => array(
  241. /**
  242. * These packages are loaded on Fuel's startup.
  243. * You can specify them in the following manner:
  244. *
  245. * array('auth'); // This will assume the packages are in PKGPATH
  246. *
  247. * // Use this format to specify the path to the package explicitly
  248. * array(
  249. * array('auth' => PKGPATH.'auth/')
  250. * );
  251. */
  252. 'packages' => array(
  253. //'orm',
  254. ),
  255. /**
  256. * These modules are always loaded on Fuel's startup. You can specify them
  257. * in the following manner:
  258. *
  259. * array('module_name');
  260. *
  261. * A path must be set in module_paths for this to work.
  262. */
  263. 'modules' => array(),
  264. /**
  265. * Classes to autoload & initialize even when not used
  266. */
  267. 'classes' => array(),
  268. /**
  269. * Configs to autoload
  270. *
  271. * Examples: if you want to load 'session' config into a group 'session' you only have to
  272. * add 'session'. If you want to add it to another group (example: 'auth') you have to
  273. * add it like 'session' => 'auth'.
  274. * If you don't want the config in a group use null as groupname.
  275. */
  276. 'config' => array(),
  277. /**
  278. * Language files to autoload
  279. *
  280. * Examples: if you want to load 'validation' lang into a group 'validation' you only have to
  281. * add 'validation'. If you want to add it to another group (example: 'forms') you have to
  282. * add it like 'validation' => 'forms'.
  283. * If you don't want the lang in a group use null as groupname.
  284. */
  285. 'language' => array(),
  286. ),
  287. );