[php-maint] php5-common - /usr/lib/php5/maxlifetime

Steve Langasek vorlon at debian.org
Fri Nov 16 18:21:15 UTC 2007


On Fri, Nov 16, 2007 at 05:30:18PM +0100, Jörg Ludwig wrote:

> /usr/lib/php5/maxlifetime ignores my change of session.gc_maxlifetime in
> /etc/php5/conf.d/iserv.ini.

Why are you adjusting the lifetime in the directory that's supposed to be
for per-module config snippets?  It's not clear to me that we want to
support this.

> I have attached a patch for /usr/lib/php5/maxlifetime to correct this.

> --- /usr/lib/php5/maxlifetime.orig	2007-11-16 17:21:38.000000000 +0100
> +++ /usr/lib/php5/maxlifetime	2007-11-16 17:21:59.000000000 +0100
> @@ -2,7 +2,7 @@
>  
>  max=1440
>  
> -for ini in /etc/php5/*/php.ini; do
> +for ini in /etc/php5/*/{php.ini,conf.d/*}; do
>  	cur=$(sed -n -e 's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini 2>/dev/null || true);
>  	[ -z "$cur" ] && cur=0
>  	[ "$cur" -gt "$max" ] && max=$cur

This patch is wrong, it uses bash-specific syntax and the script uses
/bin/sh as interpreter.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon at debian.org                                   http://www.debian.org/



More information about the pkg-php-maint mailing list