Debian Bug report logs - #837897
php5 - sessionclean doesn't take conf.d into account (patch included)

version graph

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

Reported by: Benjamin DUPUIS <poil@quake.fr>

Date: Thu, 15 Sep 2016 10:03:10 UTC

Severity: normal

Merged with 827548

Found in version php5/5.6.22+dfsg-0+deb8u1

Fixed in version php5/5.6.23+dfsg-0+deb8u1

Done: Ondřej Surý <ondrej@debian.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#837897; Package php5. (Thu, 15 Sep 2016 10:03:14 GMT) (full text, mbox, link).


Acknowledgement sent to Benjamin DUPUIS <poil@quake.fr>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 15 Sep 2016 10:03:14 GMT) (full text, mbox, link).


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

From: Benjamin DUPUIS <poil@quake.fr>
To: submit@bugs.debian.org
Subject: php5 - sessionclean doesn't take conf.d into account (patch included)
Date: Thu, 15 Sep 2016 11:46:43 +0200
Package: php5

Version: 5.6.20+dfsg-0+deb8u1

/usr/lib/php5/sessionclean doesn't take /etc/php5/*/conf.d into account.

So when you set a different value for the session.gc_maxlifetime in a 
conf.d/ in file it's not taken into account and the session are purged.

There is an easily quickfix just set export PHP_INI_SCAN_DIR before 
executing "php5"

--- /usr/lib/php5/sessionclean.orig    2016-09-15 11:43:45.752148700 +0200
+++ /usr/lib/php5/sessionclean    2016-09-15 11:44:48.703538472 +0200
@@ -8,6 +8,7 @@
 printf "$SAPIS" | \
 while IFS=: read -r conf_dir proc_name; do
     if [ -e /etc/php5/${conf_dir}/php.ini ]; then
+        export PHP_INI_SCAN_DIR=/etc/php5/${conf_dir}/conf.d
         # Get all session variables once so we don't need to start PHP 
to get each config option
         session_config=$(php5 -c /etc/php5/${conf_dir}/php.ini -d 
"error_reporting='~E_ALL'" -r 'foreach(ini_get_all("session") as $k => 
$v) echo "$k=".$v["local_value"]."\n";')
         save_handler=$(echo "$session_config" | sed -ne 
's/^session\.save_handler=\(.*\)$/\1/p')

Best regards,




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#837897; Package php5. (Thu, 15 Sep 2016 10:33:11 GMT) (full text, mbox, link).


Acknowledgement sent to Ondřej Surý <ondrej@sury.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 15 Sep 2016 10:33:11 GMT) (full text, mbox, link).


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

From: Ondřej Surý <ondrej@sury.org>
To: Benjamin DUPUIS <poil@quake.fr>, 837897@bugs.debian.org
Subject: Re: [php-maint] Bug#837897: php5 - sessionclean doesn't take conf.d into account (patch included)
Date: Thu, 15 Sep 2016 12:31:25 +0200
Control: reassign -1 php5-common
Control: fixed -1 php5/5.6.23+dfsg-0+deb8u1
Control: forcemerge 827548 -1

This has been already fixed in php5/5.6.23+dfsg-0+deb8u1

-- 
Ondřej Surý <ondrej@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver
Vše pro chleba (https://vseprochleba.cz) – Mouky ze mlýna a potřeby pro
pečení chleba všeho druhu

On Thu, Sep 15, 2016, at 11:46, Benjamin DUPUIS wrote:
> Package: php5
> 
> Version: 5.6.20+dfsg-0+deb8u1
> 
> /usr/lib/php5/sessionclean doesn't take /etc/php5/*/conf.d into account.
> 
> So when you set a different value for the session.gc_maxlifetime in a 
> conf.d/ in file it's not taken into account and the session are purged.
> 
> There is an easily quickfix just set export PHP_INI_SCAN_DIR before 
> executing "php5"
> 
> --- /usr/lib/php5/sessionclean.orig    2016-09-15 11:43:45.752148700
> +0200
> +++ /usr/lib/php5/sessionclean    2016-09-15 11:44:48.703538472 +0200
> @@ -8,6 +8,7 @@
>   printf "$SAPIS" | \
>   while IFS=: read -r conf_dir proc_name; do
>       if [ -e /etc/php5/${conf_dir}/php.ini ]; then
> +        export PHP_INI_SCAN_DIR=/etc/php5/${conf_dir}/conf.d
>           # Get all session variables once so we don't need to start PHP 
> to get each config option
>           session_config=$(php5 -c /etc/php5/${conf_dir}/php.ini -d 
> "error_reporting='~E_ALL'" -r 'foreach(ini_get_all("session") as $k => 
> $v) echo "$k=".$v["local_value"]."\n";')
>           save_handler=$(echo "$session_config" | sed -ne 
> 's/^session\.save_handler=\(.*\)$/\1/p')
> 
> Best regards,
> 
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint



Bug reassigned from package 'php5' to 'php5-common'. Request was from Ondřej Surý <ondrej@sury.org> to 837897-submit@bugs.debian.org. (Thu, 15 Sep 2016 10:33:12 GMT) (full text, mbox, link).


Marked as fixed in versions php5/5.6.23+dfsg-0+deb8u1. Request was from Ondřej Surý <ondrej@sury.org> to 837897-submit@bugs.debian.org. (Thu, 15 Sep 2016 10:33:13 GMT) (full text, mbox, link).


Marked Bug as done Request was from Ondřej Surý <ondrej@debian.org> to control@bugs.debian.org. (Thu, 15 Sep 2016 10:54:05 GMT) (full text, mbox, link).


Notification sent to Benjamin DUPUIS <poil@quake.fr>:
Bug acknowledged by developer. (Thu, 15 Sep 2016 10:54:06 GMT) (full text, mbox, link).


Marked as found in versions php5/5.6.22+dfsg-0+deb8u1. Request was from Ondřej Surý <ondrej@debian.org> to control@bugs.debian.org. (Thu, 15 Sep 2016 10:54:06 GMT) (full text, mbox, link).


Merged 827548 837897 Request was from Ondřej Surý <ondrej@debian.org> to control@bugs.debian.org. (Thu, 15 Sep 2016 10:54:07 GMT) (full text, mbox, link).


Bug archived. Request was from Ondřej Surý <ondrej@debian.org> to control@bugs.debian.org. (Thu, 15 Sep 2016 10:54:09 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 02:45:21 2023; Machine Name: buxtehude

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.