[RCD] temp_dir cleanup

till till at php.net
Tue Feb 1 14:05:13 CET 2011

On Tue, Feb 1, 2011 at 1:52 PM, A.L.E.C <alec at alec.pl> wrote:
> On 01.02.2011 13:30, Raoul Bhatia [IPAX] wrote:
>> and where is the gc() function called from? i cannot find anything
>> in relation to that.
> # grep rcmail_temp_gc program/include/*
> main.inc:function rcmail_temp_gc()
> rcmail.php:    $this->session->register_gc_handler('rcmail_temp_gc');
>> looking at my sessions table, i can see that there are sessions dating
>> back until 2 months (2011-11-30).

2010? ;-) Or do you email from the future?! ;-))

> What's your session_lifetime setting? Temp gc is called in time of
> session gc execution.

In addition to what Alec said -- sessions are usually taken care of
PHP itself. So e.g. you register a session handler and this is also
where "gc" is registered and then PHP executes this based on
session.gc_* settings in your php.ini.

On some Linux distros (like Debian/Ubuntu) that part is particulary
broken as they disable PHP's garbage collector and assume sessions are
in /tmp and run a cronjob on it instead of using the build in gargabe

List info: http://lists.roundcube.net/dev/

More information about the Dev mailing list