diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index fdaa7ba7eda..41aacae0e46 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -154,17 +154,16 @@ Configuring Garbage Collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When a session opens, PHP will call the ``gc`` handler randomly according to the -probability set by ``session.gc_probability`` / ``session.gc_divisor``. For -example if these were set to ``5/100`` respectively, it would mean a probability -of 5%. Similarly, ``3/4`` would mean a 3 in 4 chance of being called, i.e. 75%. +probability set by ``session.gc_probability`` / ``session.gc_divisor`` in ``php.ini``. +For example if these were set to ``5/100``, it would mean a probability of 5%. -If the garbage collection handler is invoked, PHP will pass the value stored in -the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this context is -that any stored session that was saved more than ``gc_maxlifetime`` ago should be -deleted. This allows one to expire records based on idle time. +If the garbage collection handler is invoked, PHP will pass the value of +``session.gc_maxlifetime``, meaning that any stored session that was saved more +than ``gc_maxlifetime`` seconds ago should be deleted. This allows to expire records +based on idle time. However, some operating systems (e.g. Debian) do their own session handling and set -the ``session.gc_probability`` variable to ``0`` to stop PHP doing garbage +the ``session.gc_probability`` directive to ``0`` to stop PHP doing garbage collection. That's why Symfony now overwrites this value to ``1``. If you wish to use the original value set in your ``php.ini``, add the following