Documentation on PHP session garbage collection needs updating.

Bug #1772915 reported by Alastair Growcott on 2018-05-23
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.3 (Debian)
New
Unknown
php7.3 (Ubuntu)
Undecided
Unassigned

Bug Description

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.

Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu, and sorry for taking so long to get to it.

This seems like a reasonable request.

Changed in php5 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
tags: added: bitesize

FYI this is added in Debian not Ubuntu quite a long time ago (2010):
=> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595706

Due to that I think we should actually add the info/doc/.. in Debian and not in Ubuntu as it applies there just as much. I'll open a bug there an quote your report.
Well actually this sounds the same
=> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831752

Since the above is closed I opened a new one.
=> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929631

Changed in php7.3 (Ubuntu):
status: New → Triaged
no longer affects: php5 (Ubuntu)

Added the remote bug and moved all to 7.3 as we won't fix that in older released I'd think

Changed in php7.3 (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.