Web Interfaces of PROSUME

app.default.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <?php
  2. return [
  3. /**
  4. * Debug Level:
  5. *
  6. * Production Mode:
  7. * false: No error messages, errors, or warnings shown.
  8. *
  9. * Development Mode:
  10. * true: Errors and warnings shown.
  11. */
  12. 'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
  13. /**
  14. * Configure basic information about the application.
  15. *
  16. * - namespace - The namespace to find app classes under.
  17. * - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time.
  18. * - encoding - The encoding used for HTML + database connections.
  19. * - base - The base directory the app resides in. If false this
  20. * will be auto detected.
  21. * - dir - Name of app directory.
  22. * - webroot - The webroot directory.
  23. * - wwwRoot - The file path to webroot.
  24. * - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
  25. * use CakePHP pretty URLs, remove these .htaccess
  26. * files:
  27. * /.htaccess
  28. * /webroot/.htaccess
  29. * And uncomment the baseUrl key below.
  30. * - fullBaseUrl - A base URL to use for absolute links. When set to false (default)
  31. * CakePHP generates required value based on `HTTP_HOST` environment variable.
  32. * However, you can define it manually to optimize performance or if you
  33. * are concerned about people manipulating the `Host` header.
  34. * - imageBaseUrl - Web path to the public images directory under webroot.
  35. * - cssBaseUrl - Web path to the public css directory under webroot.
  36. * - jsBaseUrl - Web path to the public js directory under webroot.
  37. * - paths - Configure paths for non class based resources. Supports the
  38. * `plugins`, `templates`, `locales` subkeys, which allow the definition of
  39. * paths for plugins, view templates and locale files respectively.
  40. */
  41. 'App' => [
  42. 'namespace' => 'App',
  43. 'encoding' => env('APP_ENCODING', 'UTF-8'),
  44. 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
  45. 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
  46. 'base' => false,
  47. 'dir' => 'src',
  48. 'webroot' => 'webroot',
  49. 'wwwRoot' => WWW_ROOT,
  50. //'baseUrl' => env('SCRIPT_NAME'),
  51. 'fullBaseUrl' => false,
  52. 'imageBaseUrl' => 'img/',
  53. 'cssBaseUrl' => 'css/',
  54. 'jsBaseUrl' => 'js/',
  55. 'paths' => [
  56. 'plugins' => [ROOT . DS . 'plugins' . DS],
  57. 'templates' => [APP . 'Template' . DS],
  58. 'locales' => [APP . 'Locale' . DS],
  59. ],
  60. ],
  61. /**
  62. * Security and encryption configuration
  63. *
  64. * - salt - A random string used in security hashing methods.
  65. * The salt value is also used as the encryption key.
  66. * You should treat it as extremely sensitive data.
  67. */
  68. 'Security' => [
  69. 'salt' => env('SECURITY_SALT', '__SALT__'),
  70. ],
  71. /**
  72. * Apply timestamps with the last modified time to static assets (js, css, images).
  73. * Will append a querystring parameter containing the time the file was modified.
  74. * This is useful for busting browser caches.
  75. *
  76. * Set to true to apply timestamps when debug is true. Set to 'force' to always
  77. * enable timestamping regardless of debug value.
  78. */
  79. 'Asset' => [
  80. //'timestamp' => true,
  81. // 'cacheTime' => '+1 year'
  82. ],
  83. /**
  84. * Configure the cache adapters.
  85. */
  86. 'Cache' => [
  87. 'default' => [
  88. 'className' => 'Cake\Cache\Engine\FileEngine',
  89. 'path' => CACHE,
  90. 'url' => env('CACHE_DEFAULT_URL', null),
  91. ],
  92. /**
  93. * Configure the cache used for general framework caching.
  94. * Translation cache files are stored with this configuration.
  95. * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
  96. * If you set 'className' => 'Null' core cache will be disabled.
  97. */
  98. '_cake_core_' => [
  99. 'className' => 'Cake\Cache\Engine\FileEngine',
  100. 'prefix' => 'myapp_cake_core_',
  101. 'path' => CACHE . 'persistent/',
  102. 'serialize' => true,
  103. 'duration' => '+1 years',
  104. 'url' => env('CACHE_CAKECORE_URL', null),
  105. ],
  106. /**
  107. * Configure the cache for model and datasource caches. This cache
  108. * configuration is used to store schema descriptions, and table listings
  109. * in connections.
  110. * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
  111. */
  112. '_cake_model_' => [
  113. 'className' => 'Cake\Cache\Engine\FileEngine',
  114. 'prefix' => 'myapp_cake_model_',
  115. 'path' => CACHE . 'models/',
  116. 'serialize' => true,
  117. 'duration' => '+1 years',
  118. 'url' => env('CACHE_CAKEMODEL_URL', null),
  119. ],
  120. /**
  121. * Configure the cache for routes. The cached routes collection is built the
  122. * first time the routes are processed via `config/routes.php`.
  123. * Duration will be set to '+2 seconds' in bootstrap.php when debug = true
  124. */
  125. '_cake_routes_' => [
  126. 'className' => 'Cake\Cache\Engine\FileEngine',
  127. 'prefix' => 'myapp_cake_routes_',
  128. 'path' => CACHE,
  129. 'serialize' => true,
  130. 'duration' => '+1 years',
  131. 'url' => env('CACHE_CAKEROUTES_URL', null),
  132. ],
  133. ],
  134. /**
  135. * Configure the Error and Exception handlers used by your application.
  136. *
  137. * By default errors are displayed using Debugger, when debug is true and logged
  138. * by Cake\Log\Log when debug is false.
  139. *
  140. * In CLI environments exceptions will be printed to stderr with a backtrace.
  141. * In web environments an HTML page will be displayed for the exception.
  142. * With debug true, framework errors like Missing Controller will be displayed.
  143. * When debug is false, framework errors will be coerced into generic HTTP errors.
  144. *
  145. * Options:
  146. *
  147. * - `errorLevel` - int - The level of errors you are interested in capturing.
  148. * - `trace` - boolean - Whether or not backtraces should be included in
  149. * logged errors/exceptions.
  150. * - `log` - boolean - Whether or not you want exceptions logged.
  151. * - `exceptionRenderer` - string - The class responsible for rendering
  152. * uncaught exceptions. If you choose a custom class you should place
  153. * the file for that class in src/Error. This class needs to implement a
  154. * render method.
  155. * - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
  156. * extend one of the listed exceptions will also be skipped for logging.
  157. * E.g.:
  158. * `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']`
  159. * - `extraFatalErrorMemory` - int - The number of megabytes to increase
  160. * the memory limit by when a fatal error is encountered. This allows
  161. * breathing room to complete logging or error handling.
  162. */
  163. 'Error' => [
  164. 'errorLevel' => E_ALL,
  165. 'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
  166. 'skipLog' => [],
  167. 'log' => true,
  168. 'trace' => true,
  169. ],
  170. /**
  171. * Email configuration.
  172. *
  173. * By defining transports separately from delivery profiles you can easily
  174. * re-use transport configuration across multiple profiles.
  175. *
  176. * You can specify multiple configurations for production, development and
  177. * testing.
  178. *
  179. * Each transport needs a `className`. Valid options are as follows:
  180. *
  181. * Mail - Send using PHP mail function
  182. * Smtp - Send using SMTP
  183. * Debug - Do not send the email, just return the result
  184. *
  185. * You can add custom transports (or override existing transports) by adding the
  186. * appropriate file to src/Mailer/Transport. Transports should be named
  187. * 'YourTransport.php', where 'Your' is the name of the transport.
  188. */
  189. 'EmailTransport' => [
  190. 'default' => [
  191. 'className' => 'Cake\Mailer\Transport\MailTransport',
  192. /*
  193. * The following keys are used in SMTP transports:
  194. */
  195. 'host' => 'localhost',
  196. 'port' => 25,
  197. 'timeout' => 30,
  198. 'username' => null,
  199. 'password' => null,
  200. 'client' => null,
  201. 'tls' => null,
  202. 'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
  203. ],
  204. ],
  205. /**
  206. * Email delivery profiles
  207. *
  208. * Delivery profiles allow you to predefine various properties about email
  209. * messages from your application and give the settings a name. This saves
  210. * duplication across your application and makes maintenance and development
  211. * easier. Each profile accepts a number of keys. See `Cake\Mailer\Email`
  212. * for more information.
  213. */
  214. 'Email' => [
  215. 'default' => [
  216. 'transport' => 'default',
  217. 'from' => 'you@localhost',
  218. //'charset' => 'utf-8',
  219. //'headerCharset' => 'utf-8',
  220. ],
  221. ],
  222. /**
  223. * Connection information used by the ORM to connect
  224. * to your application's datastores.
  225. *
  226. * ### Notes
  227. * - Drivers include Mysql Postgres Sqlite Sqlserver
  228. * See vendor\cakephp\cakephp\src\Database\Driver for complete list
  229. * - Do not use periods in database name - it may lead to error.
  230. * See https://github.com/cakephp/cakephp/issues/6471 for details.
  231. * - 'encoding' is recommended to be set to full UTF-8 4-Byte support.
  232. * E.g set it to 'utf8mb4' in MariaDB and MySQL and 'utf8' for any
  233. * other RDBMS.
  234. */
  235. 'Datasources' => [
  236. 'default' => [
  237. 'className' => 'Cake\Database\Connection',
  238. 'driver' => 'Cake\Database\Driver\Mysql',
  239. 'persistent' => false,
  240. 'host' => 'localhost',
  241. /*
  242. * CakePHP will use the default DB port based on the driver selected
  243. * MySQL on MAMP uses port 8889, MAMP users will want to uncomment
  244. * the following line and set the port accordingly
  245. */
  246. //'port' => 'non_standard_port_number',
  247. 'username' => 'my_app',
  248. 'password' => 'secret',
  249. 'database' => 'my_app',
  250. /*
  251. * You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6).
  252. */
  253. //'encoding' => 'utf8mb4',
  254. 'timezone' => 'UTC',
  255. 'flags' => [],
  256. 'cacheMetadata' => true,
  257. 'log' => false,
  258. /**
  259. * Set identifier quoting to true if you are using reserved words or
  260. * special characters in your table or column names. Enabling this
  261. * setting will result in queries built using the Query Builder having
  262. * identifiers quoted when creating SQL. It should be noted that this
  263. * decreases performance because each query needs to be traversed and
  264. * manipulated before being executed.
  265. */
  266. 'quoteIdentifiers' => false,
  267. /**
  268. * During development, if using MySQL < 5.6, uncommenting the
  269. * following line could boost the speed at which schema metadata is
  270. * fetched from the database. It can also be set directly with the
  271. * mysql configuration directive 'innodb_stats_on_metadata = 0'
  272. * which is the recommended value in production environments
  273. */
  274. //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
  275. 'url' => env('DATABASE_URL', null),
  276. ],
  277. /**
  278. * The test connection is used during the test suite.
  279. */
  280. 'test' => [
  281. 'className' => 'Cake\Database\Connection',
  282. 'driver' => 'Cake\Database\Driver\Mysql',
  283. 'persistent' => false,
  284. 'host' => 'localhost',
  285. //'port' => 'non_standard_port_number',
  286. 'username' => 'my_app',
  287. 'password' => 'secret',
  288. 'database' => 'test_myapp',
  289. //'encoding' => 'utf8mb4',
  290. 'timezone' => 'UTC',
  291. 'cacheMetadata' => true,
  292. 'quoteIdentifiers' => false,
  293. 'log' => false,
  294. //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
  295. 'url' => env('DATABASE_TEST_URL', null),
  296. ],
  297. ],
  298. /**
  299. * Configures logging options
  300. */
  301. 'Log' => [
  302. 'debug' => [
  303. 'className' => 'Cake\Log\Engine\FileLog',
  304. 'path' => LOGS,
  305. 'file' => 'debug',
  306. 'url' => env('LOG_DEBUG_URL', null),
  307. 'scopes' => false,
  308. 'levels' => ['notice', 'info', 'debug'],
  309. ],
  310. 'error' => [
  311. 'className' => 'Cake\Log\Engine\FileLog',
  312. 'path' => LOGS,
  313. 'file' => 'error',
  314. 'url' => env('LOG_ERROR_URL', null),
  315. 'scopes' => false,
  316. 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
  317. ],
  318. // To enable this dedicated query log, you need set your datasource's log flag to true
  319. 'queries' => [
  320. 'className' => 'Cake\Log\Engine\FileLog',
  321. 'path' => LOGS,
  322. 'file' => 'queries',
  323. 'url' => env('LOG_QUERIES_URL', null),
  324. 'scopes' => ['queriesLog'],
  325. ],
  326. ],
  327. /**
  328. * Session configuration.
  329. *
  330. * Contains an array of settings to use for session configuration. The
  331. * `defaults` key is used to define a default preset to use for sessions, any
  332. * settings declared here will override the settings of the default config.
  333. *
  334. * ## Options
  335. *
  336. * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names,
  337. * as PHP will drop sessions from cookies with `.` in the name.
  338. * - `cookiePath` - The url path for which session cookie is set. Maps to the
  339. * `session.cookie_path` php.ini config. Defaults to base path of app.
  340. * - `timeout` - The time in minutes the session should be valid for.
  341. * Pass 0 to disable checking timeout.
  342. * Please note that php.ini's session.gc_maxlifetime must be equal to or greater
  343. * than the largest Session['timeout'] in all served websites for it to have the
  344. * desired effect.
  345. * - `defaults` - The default configuration set to use as a basis for your session.
  346. * There are four built-in options: php, cake, cache, database.
  347. * - `handler` - Can be used to enable a custom session handler. Expects an
  348. * array with at least the `engine` key, being the name of the Session engine
  349. * class to use for managing the session. CakePHP bundles the `CacheSession`
  350. * and `DatabaseSession` engines.
  351. * - `ini` - An associative array of additional ini values to set.
  352. *
  353. * The built-in `defaults` options are:
  354. *
  355. * - 'php' - Uses settings defined in your php.ini.
  356. * - 'cake' - Saves session files in CakePHP's /tmp directory.
  357. * - 'database' - Uses CakePHP's database sessions.
  358. * - 'cache' - Use the Cache class to save sessions.
  359. *
  360. * To define a custom session handler, save it at src/Network/Session/<name>.php.
  361. * Make sure the class implements PHP's `SessionHandlerInterface` and set
  362. * Session.handler to <name>
  363. *
  364. * To use database sessions, load the SQL file located at config/schema/sessions.sql
  365. */
  366. 'Session' => [
  367. 'defaults' => 'php',
  368. ],
  369. ];