Package: php5-common Version: 5.5.0+dfsg-6 Severity: normal Tags: patch Dear Maintainer,
After a manual installation of the pcntl extension, I have enabled this extension only in the /etc/php5/apache2/php.ini configuration file, since the php-cli has built-in support for pcntl. Enabling pcntl extension in a generic configuration file like /etc/php5/conf.d/pcntl.ini throws following warning when using php cli : PHP Warning: Module 'pcntl' already loaded in Unknown on line 0 The 'maxlifetime' command forces the /etc/php5/apache2/php.ini configuration file with the php cli command. This outputs the warning to stderr, which is sent by email each time the /etc/cron.d/php5 crontab fragment is called. We may redirect the stderr of php command to /dev/null, or simply not use the php command at all. Attached patch provides the second solution. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/16 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages php5-common depends on: ii dpkg 1.16.10 ii libc6 2.17-7 ii lsof 4.86+dfsg-1 ii psmisc 22.20-1 ii sed 4.2.2-1 ii ucf 3.0027+nmu1 Versions of packages php5-common recommends: ii php5-json 0~git~1+c05ebf+dfsg-2 Versions of packages php5-common suggests: pn php5-user-cache <none> -- no debconf information
--- maxlifetime.origin 2013-07-07 12:28:23.477394297 +0000 +++ maxlifetime 2013-07-07 12:32:57.305407550 +0000 @@ -2,21 +2,11 @@ max=1440 -if which php5 >/dev/null 2>&1; then - for sapi in apache2 apache2filter cgi fpm; do - if [ -e /etc/php5/${sapi}/php.ini ]; then - cur=$(php5 -c /etc/php5/${sapi}/php.ini -d "error_reporting='~E_ALL'" -r 'print ini_get("session.gc_maxlifetime");') - [ -z "$cur" ] && cur=0 - [ "$cur" -gt "$max" ] && max=$cur - fi - done -else - for ini in /etc/php5/*/php.ini /etc/php5/conf.d/*.ini; do - cur=$(sed -n -e 's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini 2>/dev/null || true); - [ -z "$cur" ] && cur=0 - [ "$cur" -gt "$max" ] && max=$cur - done -fi +for ini in /etc/php5/*/php.ini /etc/php5/conf.d/*.ini; do + cur=$(sed -n -e 's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini 2>/dev/null || true); + [ -z "$cur" ] && cur=0 + [ "$cur" -gt "$max" ] && max=$cur +done echo $(($max/60))