mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #5501 from cakephp/2.6-hotfix-session-tmp-dir
Also autocreate session folder in debug mode
This commit is contained in:
commit
0a4cffc603
1 changed files with 5 additions and 0 deletions
|
@ -494,7 +494,12 @@ class CakeSession {
|
||||||
|
|
||||||
if (!empty($sessionConfig['handler'])) {
|
if (!empty($sessionConfig['handler'])) {
|
||||||
$sessionConfig['ini']['session.save_handler'] = 'user';
|
$sessionConfig['ini']['session.save_handler'] = 'user';
|
||||||
|
} elseif (!empty($sessionConfig['session.save_path']) && Configure::read('debug')) {
|
||||||
|
if (!is_dir($sessionConfig['session.save_path'])) {
|
||||||
|
mkdir($sessionConfig['session.save_path'], 0775, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($sessionConfig['ini']['session.gc_maxlifetime'])) {
|
if (!isset($sessionConfig['ini']['session.gc_maxlifetime'])) {
|
||||||
$sessionConfig['ini']['session.gc_maxlifetime'] = $sessionConfig['timeout'] * 60;
|
$sessionConfig['ini']['session.gc_maxlifetime'] = $sessionConfig['timeout'] * 60;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue