Skip to content

Commit b29c212

Browse files
alexander-schranzjaviereguiluz
authored andcommitted
[Session] Add docs to define redis session handler via php.ini directly
1 parent cfd2056 commit b29c212

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

session/database.rst

+11
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)