Debian based systems Session killed at 30 minutes in special cron, how to override?
Edit the file /usr/lib/php5/maxlifetime
The value should be in seconds. This file will actually also check your php.ini so I don't know why it wasn't working for you.
This is a question for serverfault.com.
However, change session.gc_maxlifetime
in /etc/php5/apache2/php.ini
or - if you don't have an apache2 one - one of the other /etc/php5/*/php.ini
files. The script /usr/lib/php5/maxlifetime
will then use the maximum for that setting found in any of those files.
Editing maxlifetime
won't help or at least only until the php5-common
package is updated again.
You can provide your own session path session.save_path
OR use a different handler altogether session.save_handler
You'll however need to provide appropriate mechanism for managing unwanted session files.
Found this in my php.ini
; NOTE: If you are using the subdirectory option for storing session files; (see session.save_path above), then garbage collection does *not*; happen automatically. You will need to do your own garbage; collection through a shell script, cron entry, or some other method.; For example, the following script would is the equivalent of; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):; cd /path/to/sessions; find -cmin +24 | xargs rm
I recently ran into this problem where unwanted session files were accumulating because I was using PHP and mod_fcgid
with a custom session.save_path
for each virtualhost.