[php-maint] Bug#590485: Re
Bin Zhang
bb.zhang at free.fr
Thu Aug 12 08:32:26 UTC 2010
These warnings come from the command "php5 -c
/etc/php5/apache2/php.ini" introduced (see #504053) in
/usr/lib/php5/maxlifetime:
#########################################################
--- maxlifetime.old 2010-08-12 10:25:45.000000000 +0200
+++ maxlifetime 2010-08-12 10:26:15.000000000 +0200
@@ -2,11 +2,17 @@
max=1440
-for ini in /etc/php5/*/php.ini; 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
-done
+if which php5 >/dev/null 2>&1 && [ -e /etc/php5/apache2/php.ini ]; then
+ cur=$(php5 -c /etc/php5/apache2/php.ini -r 'print
ini_get("session.gc_maxlifetime");')
+ [ -z "$cur" ] && cur=0
+ [ "$cur" -gt "$max" ] && max=$cur
+else
+ for ini in /etc/php5/*/php.ini; 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
+ done
+fi
echo $(($max/60))
##########################################################
Regards,
Bin
More information about the pkg-php-maint
mailing list