[php-maint] Bug#893317: php-common: sessionclean spams errors if php${version}-cli is removed but not purged

Mikko Rasa tdb at tdb.fi
Sat Mar 17 22:52:47 UTC 2018


Package: php-common
Version: 1:60
Severity: minor

The script /usr/lib/php/sessionclean goes through installed php versions and
runs the associated executable to obtain session variables.  The versions are
obtained by inspecting the directory /usr/lib/php.  The sessionclean script
also checks for the existence of php.ini for that version and SAPI under
/etc/php.

The package php${version}-common includes some configuration files under
/usr/lib/php/${version}, causing sessionclean to process that version.  The
package php${version}-cli contains the php.ini for the cli SAPI as well as the
executable.  If the latter package is removed but not purged, the executable
is gone but php.ini remains.  As a result sessionclean tries to obtain session
variables for that version but fails with a message like:

/usr/lib/php/sessionclean: 35: /usr/lib/php/sessionclean: php7.0: not found

Since the script is run from cron or systemd twice per hour, this generates a
fair bit of email spam to the system administrator.  The fix is easy enough
(purge the -cli package or move php.ini away if wanting to keep it), but it
seems to me that the sessionclean script could be a bit more robust in checking
which versions to process.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.1-core2 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages php-common depends on:
ii  psmisc  23.1-1
ii  sed     4.4-2

php-common recommends no packages.

php-common suggests no packages.

-- no debconf information



More information about the pkg-php-maint mailing list