[php-maint] /etc/cron.d/php5 and session garbage collection

Jean-Luc Lacroix jean.luc.lacroix at regains.be
Thu Oct 30 07:10:06 UTC 2008


Hi,

I just noticed that if a php.ini file has more than one valid value for 
session.gc_maxlifetime config variable, the /usr/lib/php5/maxlifetime script will stall.

May I suggest to add something like:
- cur=$(sed -n -e 
's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini 
2>/dev/null || true);
+ cur=$(sed -n -e 
's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini | 
tail -1 2>/dev/null || true);

This will take the last valid value for session.gc_maxlifetime.

Regards.



More information about the pkg-php-maint mailing list