Skip to content

Commit 5bac6c3

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Session] Add docs to define redis session handler via php.ini directly
2 parents 3aa1cf5 + bbf0653 commit 5bac6c3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

session/database.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ Store Sessions in a key-value Database (Redis)
1717
This section assumes that you have a fully-working Redis server and have also
1818
installed and configured the `phpredis extension`_.
1919

20+
You have two different options to use Redis to store sessions:
21+
22+
(1) The first PHP-based option is to configure Redis session handler directly in
23+
the server ``php.ini`` file:
24+
25+
.. code-block:: ini
26+
27+
; php.ini
28+
session.save_handler = redis
29+
session.save_path = "tcp://192.168.0.178:6379?auth=REDIS_PASSWORD"
30+
31+
(2) The second Symfony-based option is to configure Redis sessions as follows.
32+
2033
First, define a Symfony service for the connection to the Redis server:
2134

2235
.. configuration-block::

0 commit comments

Comments
 (0)