[RCD] temp_dir cleanup

Raoul Bhatia [IPAX] r.bhatia at ipax.at
Tue Feb 1 13:59:33 CET 2011


On 02/01/2011 01:52 PM, A.L.E.C 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).
> 
> What's your session_lifetime setting? Temp gc is called in time of
> session gc execution.

$rcmail_config['session_lifetime'] = 10;

if course i found register_gc_handler('rcmail_temp_gc').
this function sets:
> $this->gc_handlers[] = $func_name;

there is only one other function in the program that accesses
$this->gc_handlers[], namely program/include/rcube_session.php:

161:   // garbage collecting function
162:   public function gc($maxlifetime)
163:   {
164:     // just delete all expired sessions
165:     $this->db->query(
166:       sprintf("DELETE FROM %s WHERE changed < %s",
167:        get_table_name('session'), $this->db->fromunixtime(time() -
$maxlifetime)));
168:
169:     foreach ($this->gc_handlers as $fct)
170:       $fct();
171:
172:     return true;
173:   }


where is this function "gc()" called from?

cheers,
raoul
-- 
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia at ipax.at
Technischer Leiter

IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
Barawitzkagasse 10/2/2/11           email.            office at ipax.at
1190 Wien                           tel.               +43 1 3670030
FN 277995t HG Wien                  fax.            +43 1 3670030 15
____________________________________________________________________
_______________________________________________
List info: http://lists.roundcube.net/dev/
BT/aba52c80



More information about the Dev mailing list