Skip to content

Commit a3ece80

Browse files
committed
minor #17399 [Session] Add docs to define redis session handler via php.ini directly (alexander-schranz)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [Session] Add docs to define redis session handler via php.ini directly I think the most easiest way to configure session handling via redis is still configure it via `php.ini` and not via the Symfony Application. Commits ------- b29c212 [Session] Add docs to define redis session handler via php.ini directly
2 parents cfd2056 + b29c212 commit a3ece80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

session/database.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ 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+
Via the redis extension it is possible to configure redis as a session handler
21+
directly in the servers ``php.ini`` file.
22+
23+
.. code-block:: ini
24+
25+
; php.ini
26+
session.save_handler = redis
27+
session.save_path = "tcp://192.168.0.178:6379?auth=REDIS_PASSWORD"
28+
29+
Alternative you can configure it in the Symfony application.
30+
2031
First, define a Symfony service for the connection to the Redis server:
2132

2233
.. configuration-block::

0 commit comments

Comments
 (0)