Package: php5

Version: 5.6.20+dfsg-0+deb8u1

/usr/lib/php5/sessionclean doesn't take /etc/php5/*/conf.d into account.

So when you set a different value for the session.gc_maxlifetime in a conf.d/ in file it's not taken into account and the session are purged.

There is an easily quickfix just set export PHP_INI_SCAN_DIR before executing "php5"

--- /usr/lib/php5/sessionclean.orig    2016-09-15 11:43:45.752148700 +0200
+++ /usr/lib/php5/sessionclean    2016-09-15 11:44:48.703538472 +0200
@@ -8,6 +8,7 @@
 printf "$SAPIS" | \
 while IFS=: read -r conf_dir proc_name; do
     if [ -e /etc/php5/${conf_dir}/php.ini ]; then
+        export PHP_INI_SCAN_DIR=/etc/php5/${conf_dir}/conf.d
# Get all session variables once so we don't need to start PHP to get each config option 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";') save_handler=$(echo "$session_config" | sed -ne 's/^session\.save_handler=\(.*\)$/\1/p')

Best regards,

Reply via email to