mirror of
https://github.com/filegator/filegator.git
synced 2025-08-20 13:52:06 +02:00
session handler config upd
This commit is contained in:
@@ -21,4 +21,4 @@ Default handler will use simple ```/private/logs/app.log``` file to store applic
|
||||
],
|
||||
```
|
||||
|
||||
There are many different handlers you can use. Some of them are listed [here](https://github.com/Seldaek/monolog#documentation).
|
||||
There are many different handlers you can add ot top of the stack (monolog_handlers array). Some of them are listed [here](https://github.com/Seldaek/monolog#documentation).
|
||||
|
@@ -18,16 +18,13 @@ Then, open ```configuration.php``` and update Session handler to:
|
||||
'Filegator\Services\Session\SessionStorageInterface' => [
|
||||
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
||||
'config' => [
|
||||
'session_handler' => 'database',
|
||||
'available' => [
|
||||
'database' => function () {
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
|
||||
'handler' => function () {
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
|
||||
'mysql://root:password@localhost:3360/filegator'
|
||||
);
|
||||
);
|
||||
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
||||
},
|
||||
],
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
@@ -43,18 +40,15 @@ For example you can pass ```cookie_lifetime``` parameter to extend default sessi
|
||||
'Filegator\Services\Session\SessionStorageInterface' => [
|
||||
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
||||
'config' => [
|
||||
'session_handler' => 'database',
|
||||
'available' => [
|
||||
'database' => function () {
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
|
||||
'handler' => function () {
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
|
||||
'mysql://root:password@localhost:3360/filegator'
|
||||
);
|
||||
);
|
||||
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
|
||||
'cookie_lifetime' => 365 * 24 * 60 * 60, // one year
|
||||
], $handler);
|
||||
},
|
||||
],
|
||||
], $handler);
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
|
Reference in New Issue
Block a user