Debian Bug report logs - #501313
php5: lack of session.gc_probability breaks roundcube

version graph

Package: php5; Maintainer for php5 is (unknown);

Reported by: Gokdeniz Karadag <gokdenizk@gmail.com>

Date: Mon, 6 Oct 2008 14:15:01 UTC

Severity: normal

Fixed in version 5.2.6.dfsg.1-1+lenny4

Done: Ondřej Surý <ondrej@sury.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Mon, 06 Oct 2008 14:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Gokdeniz Karadag <gokdenizk@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Mon, 06 Oct 2008 14:15:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Gokdeniz Karadag <gokdenizk@gmail.com>
To: submit@bugs.debian.org
Subject: php5: lack of session.gc_probability breaks roundcube
Date: Mon, 06 Oct 2008 17:10:33 +0300
Package: php5
Severity: normal


RoundCube webmail and probably some other web applications install their
own session handlers via php functions. They store sessions in their own
databases and handle garbage collection on their own.

In default etch installation, php5 ships with session.gc_probability
setting turned off. It clears "file based" sessions wtih the cronjob,
but aforementioned webapps get no chance to run their garbage
collectors. Is it possible to have both gc_probability set, and the
cronjob running in a default install ?

Also, I have experienced that setting gc_probability in
/etc/php5/apache2/php.ini had no effect ( observed with a low, divisor
and over a long time ) but setting it with the following function call
managed to run the custom garbage collection, If this is not intentionally 
disabled in the package compilation, that might be a bug.
ini_set('session.gc_probability', 1);



-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-xen-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)





Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Fri, 10 Oct 2008 18:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Samat K Jain <samat@samat.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 10 Oct 2008 18:51:03 GMT) (full text, mbox, link).


Message #10 received at 501313@bugs.debian.org (full text, mbox, reply):

From: Samat K Jain <samat@samat.org>
To: 501313@bugs.debian.org
Cc: gokdenizk@gmail.com
Subject: Fixed in lenny?
Date: Fri, 10 Oct 2008 14:48:06 -0400
[Message part 1 (text/plain, inline)]
Do you still see this behavior in lenny? In lenny, setting session.gc_probablity to a non-zero enables garbage collection again.

This has been "fixed"; there's now a mention in php.ini to turn this setting on, see bugs:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388808
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388808

-- 
Samat Jain <http://samat.org/> | GPG: 0x1A1993D3
Partner, Chief Technology Officer | Rhombic Networks, LLC

It is dangerous to be right when the government is wrong.
-- Voltaire (174)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Sun, 12 Oct 2008 19:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Gokdeniz Karadag <gokdenizk@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Sun, 12 Oct 2008 19:03:03 GMT) (full text, mbox, link).


Message #15 received at 501313@bugs.debian.org (full text, mbox, reply):

From: Gokdeniz Karadag <gokdenizk@gmail.com>
Cc: 501313@bugs.debian.org
Subject: Re: Fixed in lenny?
Date: Sun, 12 Oct 2008 21:59:53 +0300
Hi I think you meant also this bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321460

I cannot test with lenny as I have no installed lenny system, but if
gc_probability setting in php.ini is honored, then the bug is fixed.

Is it possible to make php in etch aware of the gc_probability setting By using
the same fix?

Samat K Jain demis ki::
> Do you still see this behavior in lenny? In lenny, setting session.gc_probablity to a non-zero enables garbage collection again.
> 
> This has been "fixed"; there's now a mention in php.ini to turn this setting on, see bugs:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388808
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388808
> 




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Wed, 15 Oct 2008 06:42:02 GMT) (full text, mbox, link).


Acknowledgement sent to Samat K Jain <samat@samat.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 15 Oct 2008 06:42:02 GMT) (full text, mbox, link).


Message #20 received at 501313@bugs.debian.org (full text, mbox, reply):

From: Samat K Jain <samat@samat.org>
To: Gokdeniz Karadag <gokdenizk@gmail.com>
Cc: 501313@bugs.debian.org
Subject: Re: Fixed in lenny?
Date: Wed, 15 Oct 2008 02:38:31 -0400
[Message part 1 (text/plain, inline)]
> I cannot test with lenny as I have no installed lenny system, but if
> gc_probability setting in php.ini is honored, then the bug is fixed.

It is honored on lenny, yes. Though, it remains disabled (gc_probability = 0).

> Is it possible to make php in etch aware of the gc_probability setting By
> using the same fix?

Someone else will have to answer that... But since lenny will become the new stable soon (hopefully), it may be better use of effort to prepare a switch to lenny than debugging this in etch.

-- 
Samat Jain <http://samat.org/> | GPG: 0x1A1993D3
Partner, Chief Technology Officer | Rhombic Networks, LLC

Arbitrary system (n): System about which nothing general can be said, save "nothing general can be said."
-- Anonymous (430)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Thu, 16 Oct 2008 01:09:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Raphael Geissert" <atomo64@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 16 Oct 2008 01:09:02 GMT) (full text, mbox, link).


Message #25 received at 501313@bugs.debian.org (full text, mbox, reply):

From: "Raphael Geissert" <atomo64@gmail.com>
To: "Samat K Jain" <samat@samat.org>, 501313@bugs.debian.org
Cc: "Gokdeniz Karadag" <gokdenizk@gmail.com>
Subject: Re: [php-maint] Bug#501313: Fixed in lenny?
Date: Wed, 15 Oct 2008 20:07:43 -0500
Hi,

2008/10/15 Samat K Jain <samat@samat.org>:
>> I cannot test with lenny as I have no installed lenny system, but if
>> gc_probability setting in php.ini is honored, then the bug is fixed.
>
> It is honored on lenny, yes. Though, it remains disabled (gc_probability = 0).
>
>> Is it possible to make php in etch aware of the gc_probability setting By
>> using the same fix?
>
> Someone else will have to answer that... But since lenny will become the new stable soon (hopefully), it may be better use of effort to prepare a switch to lenny than debugging this in etch.
>

IIRC gc_probability should work in etch just like it does in lenny. It
was just turned off in the default php.ini, nothing else.

Please confirm soon, or else I'll just close this bug as there is no real bug.

> --
> Samat Jain <http://samat.org/> | GPG: 0x1A1993D3
> Partner, Chief Technology Officer | Rhombic Networks, LLC
>
> Arbitrary system (n): System about which nothing general can be said, save "nothing general can be said."
> -- Anonymous (430)
>
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-php-maint
>


Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Thu, 16 Oct 2008 10:06:03 GMT) (full text, mbox, link).


Acknowledgement sent to Gokdeniz Karadag <gokdenizk@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 16 Oct 2008 10:06:03 GMT) (full text, mbox, link).


Message #30 received at 501313@bugs.debian.org (full text, mbox, reply):

From: Gokdeniz Karadag <gokdenizk@gmail.com>
To: Raphael Geissert <atomo64@gmail.com>
Cc: 501313@bugs.debian.org
Subject: Re: [php-maint] Bug#501313: Fixed in lenny?
Date: Thu, 16 Oct 2008 12:39:49 +0300
Raphael Geissert demis ki::
> Hi,
> 
> 2008/10/15 Samat K Jain <samat@samat.org>:
>>> I cannot test with lenny as I have no installed lenny system, but if
>>> gc_probability setting in php.ini is honored, then the bug is fixed.
>> It is honored on lenny, yes. Though, it remains disabled (gc_probability = 0).
>>
>>> Is it possible to make php in etch aware of the gc_probability setting By
>>> using the same fix?
>> Someone else will have to answer that... But since lenny will become the new stable soon (hopefully), it may be better use of effort to prepare a switch to lenny than debugging this in etch.
>>
> 
> IIRC gc_probability should work in etch just like it does in lenny. It
> was just turned off in the default php.ini, nothing else.
> 
> Please confirm soon, or else I'll just close this bug as there is no real bug.

There is a problem in etch.

In etch, I have changed the gc_probability in php.ini,
I gave a high probability/divisor ratio (about 1/10, also tried 1/1)
and restarted apache. Garbage collection never happened.

As soon as I copied those settings into the webapp's code with iniset,
garbage collection worked.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267720
This states that gc_probability was compiled in as 0,
"""
* Comment out session.gc_probability in the default php.ini, as we've
     now compiled in a default of 0, allowing the cronjob to do the
     garbage collection for us instead. (closes: #267720)
"""

Changing it back may allow the setting in php.ini work.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Thu, 16 Oct 2008 20:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Raphael Geissert" <atomo64@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 16 Oct 2008 20:39:02 GMT) (full text, mbox, link).


Message #35 received at 501313@bugs.debian.org (full text, mbox, reply):

From: "Raphael Geissert" <atomo64@gmail.com>
To: "Gokdeniz Karadag" <gokdenizk@gmail.com>, 501313@bugs.debian.org
Subject: Re: [php-maint] Bug#501313: Bug#501313: Fixed in lenny?
Date: Thu, 16 Oct 2008 15:38:03 -0500
[Please do not send me a copy of the message, IOW: no To nor B/CC]

2008/10/16 Gokdeniz Karadag <gokdenizk@gmail.com>:
[...]
> There is a problem in etch.
>
> In etch, I have changed the gc_probability in php.ini,
> I gave a high probability/divisor ratio (about 1/10, also tried 1/1)
> and restarted apache. Garbage collection never happened.

And what sessions path are you using? are you sure the process does
actually have enough rights to delete the files? are you sure the max
life time was reached?

>
> As soon as I copied those settings into the webapp's code with iniset,
> garbage collection worked.
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267720
> This states that gc_probability was compiled in as 0,
> """
> * Comment out session.gc_probability in the default php.ini, as we've
>     now compiled in a default of 0, allowing the cronjob to do the
>     garbage collection for us instead. (closes: #267720)
> """
>
> Changing it back may allow the setting in php.ini work.
>

The only change that was done here was to default to 0 in php itself
(i.e. if gc_probability is not defined in php.ini it will default to
0/off).

>
>

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net

Satchel Paige  - "Don't look back. Something might be gaining on you."




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#501313; Package php5. (Fri, 17 Oct 2008 11:15:02 GMT) (full text, mbox, link).


Acknowledgement sent to Gokdeniz Karadag <gokdenizk@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 17 Oct 2008 11:15:02 GMT) (full text, mbox, link).


Message #40 received at 501313@bugs.debian.org (full text, mbox, reply):

From: Gokdeniz Karadag <gokdenizk@gmail.com>
To: 501313@bugs.debian.org
Subject: Re: [php-maint] Bug#501313: Bug#501313: Fixed in lenny?
Date: Fri, 17 Oct 2008 14:13:38 +0300
Raphael Geissert demis ki::
> [Please do not send me a copy of the message, IOW: no To nor B/CC]
> 
> 2008/10/16 Gokdeniz Karadag <gokdenizk@gmail.com>:
> [...]
>> There is a problem in etch.
>>
>> In etch, I have changed the gc_probability in php.ini,
>> I gave a high probability/divisor ratio (about 1/10, also tried 1/1)
>> and restarted apache. Garbage collection never happened.
> 
> And what sessions path are you using? are you sure the process does
> actually have enough rights to delete the files? are you sure the max
> life time was reached?
> 

The sessions are stored in a database, and there is write access to database.
The webapp(Roundcube) did not have much users, there were 3000+ sessions in the
database. When garbage collection was moved to the webapp code my first login
initiated garbage collection and number fell to 16.

>> As soon as I copied those settings into the webapp's code with iniset,
>> garbage collection worked.
>>
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267720
>> This states that gc_probability was compiled in as 0,
>> """
>> * Comment out session.gc_probability in the default php.ini, as we've
>>     now compiled in a default of 0, allowing the cronjob to do the
>>     garbage collection for us instead. (closes: #267720)
>> """
>>
>> Changing it back may allow the setting in php.ini work.
>>
> 
> The only change that was done here was to default to 0 in php itself
> (i.e. if gc_probability is not defined in php.ini it will default to
> 0/off).

I also guess so, but somehow the setting in php.ini does not get honored. (I
restarted apache, made sure no stale process exists.)

This bug was solved in roundcube by adding the ini_set call to the code, but
other people may have problems with other software.

- Gokdeniz




Reply sent to Ondřej Surý <ondrej@sury.org>:
You have taken responsibility. (Fri, 08 Jan 2010 16:36:11 GMT) (full text, mbox, link).


Notification sent to Gokdeniz Karadag <gokdenizk@gmail.com>:
Bug acknowledged by developer. (Fri, 08 Jan 2010 16:36:11 GMT) (full text, mbox, link).


Message #45 received at 501313-done@bugs.debian.org (full text, mbox, reply):

From: Ondřej Surý <ondrej@sury.org>
To: 501313-done@bugs.debian.org
Subject: #501313: php5: lack of session.gc_probability breaks roundcube
Date: Fri, 8 Jan 2010 17:35:14 +0100
Version: 5.2.6.dfsg.1-1+lenny4

gc_probability is set to non-zero in current stable (lenny)

-- 
Ondřej Surý <ondrej@sury.org>
http://blog.rfc1925.org/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 06 Feb 2010 07:28:20 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 03:08:34 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.