shadyhill wrote:
Thanks. I looked at those files. The only existing file was /etc/php5/apache2/php.ini and it actually did have session.gc_maxlifetime = 1440. I looked for other cases of php.ini and any version I found also had that variable with that value. Checking /usr/lib/php5/maxlifetime still returns no value.
Here are the contents of sessionclean:
#!/bin/sh
# first find all used files and touch them (hope it's not massive amount of files)
lsof -w -l +d "${1}" | awk -- '{ if (NR > 1) { print $9; } }' | xargs -i touch -c {}
# find all files older then maxlifetime
find "${1}" -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +${2} -delete
Looking at the script, it looks like it has no value for ${2} – what is it expecting there?
The command was:
/usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)
$2 is the output of /usr/lib/php5/maxlifetime
maxlifetime really should be returning something, I don't see why it isn't. You could try deleting the line containing 'session.gc_maxlifetime = 1440' from php.ini and copy and pasting it from this message, just in case there is some whitespace problem that causes the script to fail.