[php-maint] /usr/lib/php5/sessionclean "arithmetic expression: expecting primary" issue in jessie
Olav Seyfarth
olav at seyfarth.de
Tue Apr 28 21:40:48 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi *,
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"
So I tried to understand the sessionclean script and propose the attached patch.
Olav
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Dies ist eine elektronische Signatur - http://www.enigmail.net/
iQGcBAEBCAAGBQJVP/5XAAoJEKGX32tq4e9Wf5kL/ib5JzPKAn5xDNH9FTGCE/0I
Qsxb5i92jcoOZzuMTpWbC78X/H1/N1WBYLXMrbCT5VAOEEyFWsiB5QuGFQ00Bj/s
rp2LmQlZVzY/DE6d75b/n5HckXfPGwIMhAcCoDDlVvyPREwNYGlQnbA5kQSx+tKw
VtX7d90pzlnG7diJjb/69KlIKkSIAnxVm2hTNHw0CKUc6k4poa2uq2VPrkNYRXxj
igS2vywUGj4hrdT5cFX7GN/Q8IGx1KfD1/7/WyOwS+pHe0Y3LBEJ88NyNcXtf5oo
15xBSOkQT0cCi3FiIr0+WEuefhncrO9MglhjbJzocLXgb5a5zYaiKc/Dcw0B/5Me
A2NqFoL0IF8v+Xx63Q+Xsze1HdEF6fqp/Crz93BSDMaAKfPR2cuIe0tYD1K9KaNn
pcxbwpi9NwOrV+tNveH/u9NlG3ha+dyEMs6tMW4NCUmNtQ+SPH8xUXoDXZioGMpX
L4bmq98Wd+YnEQ1zt0H1HPG/51yIxA8+1MwzmeurTg==
=TaWF
-----END PGP SIGNATURE-----
-------------- 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sessionclean-patch.sig
Type: application/octet-stream
Size: 415 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20150428/8ead3cea/attachment.obj>
More information about the pkg-php-maint
mailing list