Public bug reported:

The Ubuntu distribution of PHP doesn't use the usual PHP mechanism of
session garbage collection. It sets "session.gc_probability" to zero in
the php.ini file, thus making it seem like garbage collection is
disabled. In fact it still occurs but with a cron job.

In my Docker image, the PHP "sessionclean" program is being executed and
it seems that this uses the "session.gc_maxlifetime" setting from the
apache2 version of the php.ini file. However this is non-obvious and not
documented in the php.ini file. Thus when recently rebuilding my Docker
image for my web service, I started getting what seemed to be premature
session timeouts and I couldn't figure out why and I ended up raising a
bug on the PHP team (https://bugs.php.net/bug.php?id=76368).

If the Ubuntu team is going to modify the PHP package so it differs in
behaviour from the description in the PHP provided documentation, then
they need to provide updated documentation.

I would suggest that the simplest solution is to update the php.ini file
so that where "session.gc_probability" is set to zero there is a short
paragraph saying why (because it is handled by the cron job) and also
make it clear somewhere in that file that the "session.gc_maxlifetime"
setting is still relevant even though "session.gc_probability" is zero.

** Affects: php5 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1772915

Title:
  Documentation on PHP session garbage collection needs updating.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1772915/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to