Date: Wed, 18 Aug 2010 20:09:01 +0300 From: Cron DaemonFirst, I had to determine the package causing the trouble:
To: email@example.com Subject: Cron [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm PHP Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
# dpkg -S /usr/lib/php5/maxlifetime php5-common: /usr/lib/php5/maxlifetimeWhile some of the bugs listed at the Debian BTS seemed relevant, none seemed to match my exact situation.
I searched for the exact error messages I got, and found a few references on the PHP BTS. Some of these revolved around a problem with disabling warning reports from the PHP interpreter.
I decided it was time to follow the code instead of hyperlinks.
/usr/lib/php5/maxlifetimeis a short shell script which calls the PHP command line interpreter, like this:
php5 -c /etc/php5/apache2/php.ini -r 'print ini_get("session.gc_maxlifetime");'I tried it at the command line, and I got the same warnings. Got it!
But now what? after all, I know next to nothing about PHP...
Well, it did seem plausible that the problem had to do with the configuration file
/etc/php5/apache2/php.ini, so I stared at it for a while until I found that warning messages can be disabled like this:
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNINGI got rid of the annoying email messages alright, but I didn't really solve the problem - it's just a workaround.
Life's full of workarounds, and I'm slowly getting used to it.