[php-maint] Bug#788060: php5-common: /usr/lib/php5/sessionclean "arithmetic expression: expecting primary"
Olav Seyfarth
bugs.olav at seyfarth.de
Mon Jun 8 07:49:52 UTC 2015
Package: php5-common
Version: 5.6.9+dfsg-0+deb8u1
Severity: normal
Tags: patch
I sent this to pkg-php-maint at lists.alioth.debian.org on April, 28th:
I upgraded wheezy to jessie and experienced administrative mails telling me:
/usr/lib/php5/sessionclean: 15: /usr/lib/php5/sessionclean:
arithmetic expression: expecting primary: "/60"
I tried to understand the script and propose the attached patch.
Ondřej asked to file a bug and describe environment that led to this behaviour.
Well, nothing special as far as I see it: I run a simplistic PHP-enabled apache.
Please state which additional information I shall provide.
-- Package-specific info:
==== Additional PHP 5 information ====
++++ PHP 5 SAPI (php5query -S): ++++
cli
apache2
++++ PHP 5 Extensions (php5query -M -v): ++++
gd (Enabled for cli by maintainer script)
gd (Enabled for apache2 by maintainer script)
mysqli (Enabled for cli by maintainer script)
mysqli (Enabled for apache2 by maintainer script)
mysqlnd (Enabled for cli by maintainer script)
mysqlnd (Enabled for apache2 by maintainer script)
mcrypt (Enabled for cli by maintainer script)
mcrypt (Enabled for apache2 by maintainer script)
pdo_mysql (Enabled for cli by maintainer script)
pdo_mysql (Enabled for apache2 by maintainer script)
pdo (Enabled for cli by maintainer script)
pdo (Enabled for apache2 by maintainer script)
json (Enabled for cli by maintainer script)
json (Enabled for apache2 by maintainer script)
readline (Enabled for cli by maintainer script)
readline (Enabled for apache2 by maintainer script)
opcache (Enabled for cli by maintainer script)
opcache (Enabled for apache2 by maintainer script)
curl (Enabled for cli by maintainer script)
curl (Enabled for apache2 by maintainer script)
mysql (Enabled for cli by maintainer script)
mysql (Enabled for apache2 by maintainer script)
++++ Configuration files: ++++
**** /etc/php5/mods-available/pdo.ini ****
extension=pdo.so
**** /etc/php5/mods-available/opcache.ini ****
zend_extension=opcache.so
-- System Information:
Debian Release: 8.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF8, LC_CTYPE=de_DE.UTF8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages php5-common depends on:
ii libc6 2.19-18
ii lsof 4.86+dfsg-1
ii psmisc 22.21-2
ii sed 4.2.2-4+b1
ii ucf 3.0030
php5-common recommends no packages.
Versions of packages php5-common suggests:
pn php5-user-cache <none>
Versions of packages php5-cli depends on:
ii libbz2-1.0 1.0.6-7+b3
ii libc6 2.19-18
ii libcomerr2 1.42.12-1.1
ii libdb5.3 5.3.28-9
ii libedit2 3.1-20140620-2
ii libgssapi-krb5-2 1.12.1+dfsg-19
ii libk5crypto3 1.12.1+dfsg-19
ii libkrb5-3 1.12.1+dfsg-19
ii libmagic1 1:5.22+15-2
ii libonig2 5.9.5-3.2
ii libpcre3 2:8.35-3.3
ii libqdbm14 1.8.78-5+b1
ii libssl1.0.0 1.0.1k-3
ii libxml2 2.9.1+dfsg1-5
ii mime-support 3.58
ii php5-json 1.3.6-1
ii tzdata 2015d-0+deb8u1
ii ucf 3.0030
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages php5-cli recommends:
ii php5-readline 5.6.9+dfsg-0+deb8u1
Versions of packages php5-cli suggests:
ii php-pear 5.6.9+dfsg-0+deb8u1
Versions of packages libapache2-mod-php5 depends on:
ii apache2 2.4.10-10
ii apache2-bin [apache2-api-20120211] 2.4.10-10
ii libbz2-1.0 1.0.6-7+b3
ii libc6 2.19-18
ii libcomerr2 1.42.12-1.1
ii libdb5.3 5.3.28-9
ii libgssapi-krb5-2 1.12.1+dfsg-19
ii libk5crypto3 1.12.1+dfsg-19
ii libkrb5-3 1.12.1+dfsg-19
ii libmagic1 1:5.22+15-2
ii libonig2 5.9.5-3.2
ii libpcre3 2:8.35-3.3
ii libqdbm14 1.8.78-5+b1
ii libssl1.0.0 1.0.1k-3
ii libstdc++6 4.9.2-10
ii libxml2 2.9.1+dfsg1-5
ii mime-support 3.58
ii php5-cli 5.6.9+dfsg-0+deb8u1
ii php5-json 1.3.6-1
ii tzdata 2015d-0+deb8u1
ii ucf 3.0030
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages libapache2-mod-php5 suggests:
ii php-pear 5.6.9+dfsg-0+deb8u1
-- no debconf information
-------------- next part --------------
13,15d12
< save_handler=$(echo "$session_config" | sed -ne 's/^session\.save_handler=\(.*\)$/\1/p')
< save_path=$(echo "$session_config" | sed -ne 's/^session\.save_path=\(.*\)$/\1/p')
< gc_maxlifetime=$(($(echo "$session_config" | sed -ne 's/^session\.gc_maxlifetime=\(.*\)$/\1/p')/60))
17,20c14,28
< if [ "$save_handler" = "files" -a -d "$save_path" ]; then
< proc_names="$proc_names $proc_name";
< printf "%s:%s\n" "$save_path" "$gc_maxlifetime"
< fi
---
> # makes only sense if session_config is not empty
> # (does throw "expecting primary" error if executed with empty session_config)
> if [ $session_config ] ; then
>
> save_handler=$(echo "$session_config" | sed -ne 's/^session\.save_handler=\(.*\)$/\1/p')
> save_path=$(echo "$session_config" | sed -ne 's/^session\.save_path=\(.*\)$/\1/p')
> gc_maxlifetime=$(($(echo "$session_config" | sed -ne 's/^session\.gc_maxlifetime=\(.*\)$/\1/p')/60))
>
> if [ "$save_handler" = "files" -a -d "$save_path" ]; then
> proc_names="$proc_names $proc_name";
> printf "%s:%s\n" "$save_path" "$gc_maxlifetime"
> fi
>
> fi
>
More information about the pkg-php-maint
mailing list