Additional information: php-cli still scans the compiled-in conf.d
directory (/etc/php5/cli/conf.d), so the sessionclean script will mix
apache2-sapi and cli-sapi ini settings during execution. So setting
gc_maxlifetime for the cli-sapi helps you to correctly expire apache2
sessions (definitely not the recommended way, but it works):

# echo "session.gc_maxlifetime = 3456" > /etc/php5/cli/conf.d/90-local.ini
# /usr/lib/php5/sessionclean
DEBUG: /var/lib/php5/sessions 57

A possible bug fix is to set PHP_INI_SCAN_DIR before executing php:

-        session_config=$(php5 -c /etc/php5/${conf_dir}/php.ini -d
"error_reporting='~E_ALL'" -r 'foreach(ini_get_all("session") as $k =>
$v) echo "$k=".$v["local_value"]."\n";')
+        session_config=$(PHP_INI_SCAN_DIR=/etc/php5/${conf_dir}/conf.d
php5 -c /etc/php5/${conf_dir}/php.ini -d "error_reporting='~E_ALL'" -r
'foreach(ini_get_all("session") as $k => $v) echo
"$k=".$v["local_value"]."\n";')

Chris

Reply via email to