[php-maint] Bug#654887: Bug#654887: php5-common: maxlifetime cronentry sends frequent warnings (patch)

Witold Baryluk baryluk at smp.if.uj.edu.pl
Tue May 29 00:34:25 UTC 2012


On 05-28 16:26, Ondřej Surý wrote:
> reassing 654887 php5
> forcemerge 422173 654887
> thank you
> 
> Hi Witold,
> 
> this is not a really good solution to the problem. The real problem
> lies in the fact, you have removed, but not purged packages which
> installed php modules. Ignoring the output of the cron job could just
> hide some more serious problem
> 
> Also this has been fixed in unstable (and wheezy), see the #422173. If
> you encounter this problem every again this needs to be filled against
> individual packages which carry wrong configuration system (there's a
> new php5{en,dis}mod helper program which needs to be used).
> 
> Unfortunatelly we cannot fix that in old packages which have been
> removed but not purged, since the new version will never get
> installed.
> 
> O.

I understand devnulling stderr isn't best option, but seriously if,
simple php script which just outputs a single number is broken, then I
think all other php script in the system will not work or output same
warnings, and it will be quite easy to notice this problem. So
devnulling stderr in cron job isn't actually hidning anything IMHO.

Interesingly I almost everytime add --purge to my dist-upgrade or
remove, so it should be purged, with configuration files.

$ dpkg -l | grep php | grep -v ^i
$ 

Whatever was reason configuration files are still there, I assume it is
just history. (I think i installed php_gtk2 or cairo using pear or just
manually compiling, when trying to run phoronix-test-suite before it was
in Debian repos. But I think it wasn't the case with sqlite extension,
which in fact was almost always in Debian for long time).

I just manually removed offending ini files in /etc/php5/conf.d, and it
should not make any more problems for me.

(btw. I really like new conf.d structure).

> 
> On Wed, May 23, 2012 at 6:07 AM, Witold Baryluk
> <baryluk at smp.if.uj.edu.pl> wrote:
> > Package: php5-common
> > Version: 5.4.3-5
> > Followup-For: Bug #654887
> >
> > I belive this simple patch should fix problem
> >
> >
> > --- php5.org    2012-05-23 06:03:40.256007592 +0200
> > +++ php5        2012-05-23 06:04:15.764688333 +0200
> > @@ -4,4 +4,4 @@
> >  #  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime
> >
> >  # Look for and purge old sessions every 30 minutes
> > -09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d
> > /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f
> > -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {}
> > 2>/dev/null \; -delete
> > +09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d
> > /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f
> > -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime 2>/dev/null) ! -execdir
> > fuser -s {} 2>/dev/null \; -delete
> >
> >
> >
> >
> > It just redirects stderr of maxlifetime script to /dev/null.
> >
> > In my case normally it produces something like this:
> >
> > baryluk at sredniczarny /etc/cron.d/ > /usr/lib/php5/maxlifetime
> > PHP Warning:  PHP Startup: Unable to load dynamic library
> > '/usr/lib/php5/20100525+lfs/cairo.so' - /usr/lib/php5/20100525+lfs/cairo.so:
> > cannot open shared object file: No such file or directory in Unknown on line 0
> > PHP Warning:  PHP Startup: Unable to load dynamic library
> > '/usr/lib/php5/20100525+lfs/php_gtk2.so' -
> > /usr/lib/php5/20100525+lfs/php_gtk2.so: cannot open shared object file: No such
> > file or directory in Unknown on line 0
> > PHP Warning:  PHP Startup: Unable to load dynamic library
> > '/usr/lib/php5/20100525+lfs/sqlite.so' - /usr/lib/php5/20100525+lfs/sqlite.so:
> > cannot open shared object file: No such file or directory in Unknown on line 0
> > 24
> >
> > which makes my mailbox full of cronjobs output.
> >
> > Regards,
> > Witek
> >
> >
> >
> > -- System Information:
> > Debian Release: wheezy/sid
> >  APT prefers unstable
> >  APT policy: (500, 'unstable'), (1, 'experimental')
> > Architecture: i386 (i686)
> >
> > Kernel: Linux 3.4.0-t43-devel-smp-01513-g9daeaa3-dirty (SMP w/1 CPU core)
> > Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to pl_PL.UTF-8)
> > Shell: /bin/sh linked to /bin/dash
> >
> > Versions of packages php5-common depends on:
> > ii  dpkg    1.16.3
> > ii  libc6   2.13-32
> > ii  psmisc  22.16-1
> > ii  sed     4.2.1-9
> > ii  ucf     3.0025+nmu3
> >
> > php5-common recommends no packages.
> >
> > php5-common suggests no packages.
> >
> > -- Configuration Files:
> > /etc/cron.d/php5 changed [not included]
> >
> > -- no debconf information
> >
> >
> >
> > _______________________________________________
> > pkg-php-maint mailing list
> > pkg-php-maint at lists.alioth.debian.org
> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint
> 
> 
> 
> -- 
> Ondřej Surý <ondrej at sury.org>

-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl





More information about the pkg-php-maint mailing list