|
63 | 63 | 'jsBaseUrl' => 'js/', |
64 | 64 | 'paths' => [ |
65 | 65 | 'plugins' => [ROOT . DS . 'plugins' . DS], |
66 | | - 'templates' => [APP . 'Template' . DS], |
67 | | - 'locales' => [APP . 'Locale' . DS], |
| 66 | + 'templates' => [ROOT . DS . 'templates' . DS], |
| 67 | + 'locales' => [RESOURCES . 'locales' . DS], |
68 | 68 | ], |
69 | 69 | ], |
70 | 70 |
|
|
111 | 111 | '_cake_core_' => [ |
112 | 112 | 'className' => FileEngine::class, |
113 | 113 | 'prefix' => 'myapp_cake_core_', |
114 | | - 'path' => CACHE . 'persistent/', |
| 114 | + 'path' => CACHE . 'persistent' . DS, |
115 | 115 | 'serialize' => true, |
116 | 116 | 'duration' => '+1 years', |
117 | 117 | 'url' => env('CACHE_CAKECORE_URL', null), |
|
126 | 126 | '_cake_model_' => [ |
127 | 127 | 'className' => FileEngine::class, |
128 | 128 | 'prefix' => 'myapp_cake_model_', |
129 | | - 'path' => CACHE . 'models/', |
| 129 | + 'path' => CACHE . 'models' . DS, |
130 | 130 | 'serialize' => true, |
131 | 131 | 'duration' => '+1 years', |
132 | 132 | 'url' => env('CACHE_CAKEMODEL_URL', null), |
|
259 | 259 | * other RDBMS. |
260 | 260 | */ |
261 | 261 | 'Datasources' => [ |
| 262 | + /** |
| 263 | + * These configurations should contain permanent settings used |
| 264 | + * by all environments. |
| 265 | + * |
| 266 | + * The values in app_local.php will override any values set here |
| 267 | + * and should be used for local and per-environment configurations. |
| 268 | + * |
| 269 | + * Environment variable based configurations can be loaded here or |
| 270 | + * in app_local.php depending on the applications needs. |
| 271 | + */ |
262 | 272 | 'default' => [ |
263 | 273 | 'className' => Connection::class, |
264 | 274 | 'driver' => Mysql::class, |
265 | 275 | 'persistent' => false, |
266 | | - 'host' => 'localhost', |
267 | | - /* |
268 | | - * CakePHP will use the default DB port based on the driver selected |
269 | | - * MySQL on MAMP uses port 8889, MAMP users will want to uncomment |
270 | | - * the following line and set the port accordingly |
271 | | - */ |
272 | | - //'port' => 'non_standard_port_number', |
273 | | - /* |
274 | | - * It is recommended to set these options through your environment or app_local.php |
275 | | - */ |
276 | | - //'username' => 'my_app', |
277 | | - //'password' => 'secret', |
278 | | - //'database' => 'my_app', |
279 | | - /* |
280 | | - * You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6). |
| 276 | + 'timezone' => 'UTC', |
| 277 | + |
| 278 | + /** |
| 279 | + * For MariaDB/MySQL the internal default changed from utf8 to utf8mb4, aka full utf-8 support, in CakePHP 3.6 |
281 | 280 | */ |
282 | 281 | //'encoding' => 'utf8mb4', |
283 | | - 'timezone' => 'UTC', |
| 282 | + |
| 283 | + /** |
| 284 | + * If your MySQL server is configured with `skip-character-set-client-handshake` |
| 285 | + * then you MUST use the `flags` config to set your charset encoding. |
| 286 | + * For e.g. `'flags' => [\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4']` |
| 287 | + */ |
284 | 288 | 'flags' => [], |
285 | 289 | 'cacheMetadata' => true, |
286 | 290 | 'log' => false, |
|
303 | 307 | * which is the recommended value in production environments |
304 | 308 | */ |
305 | 309 | //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], |
306 | | - |
307 | | - 'url' => env('DATABASE_URL', null), |
308 | 310 | ], |
309 | 311 |
|
310 | 312 | /* |
|
314 | 316 | 'className' => Connection::class, |
315 | 317 | 'driver' => Mysql::class, |
316 | 318 | 'persistent' => false, |
317 | | - 'host' => 'localhost', |
318 | | - //'port' => 'non_standard_port_number', |
319 | | - 'username' => 'my_app', |
320 | | - 'password' => 'secret', |
321 | | - 'database' => 'test_myapp', |
322 | | - //'encoding' => 'utf8mb4', |
323 | 319 | 'timezone' => 'UTC', |
| 320 | + //'encoding' => 'utf8mb4', |
| 321 | + 'flags' => [], |
324 | 322 | 'cacheMetadata' => true, |
325 | 323 | 'quoteIdentifiers' => false, |
326 | 324 | 'log' => false, |
327 | 325 | //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], |
328 | | - 'url' => env('DATABASE_TEST_URL', null), |
329 | 326 | ], |
330 | 327 | ], |
331 | 328 |
|
|
368 | 365 | * |
369 | 366 | * ## Options |
370 | 367 | * |
371 | | - * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names, |
372 | | - * as PHP will drop sessions from cookies with `.` in the name. |
| 368 | + * - `cookie` - The name of the cookie to use. Defaults to value set for `session.name` php.ini config. |
| 369 | + * Avoid using `.` in cookie names, as PHP will drop sessions from cookies with `.` in the name. |
373 | 370 | * - `cookiePath` - The url path for which session cookie is set. Maps to the |
374 | 371 | * `session.cookie_path` php.ini config. Defaults to base path of app. |
375 | 372 | * - `timeout` - The time in minutes the session should be valid for. |
|
0 commit comments