Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

SessionTimeout

Summary

This setting will define the number of seconds a session will last.

Usage

SessionTimeout=<integer>

Description

This setting will define the number of seconds a session will last. After the specified time has passed the session will no longer be considered valid, and the user will be logged out even if he/she is active on the site.

259200 seconds, the equivalent of 3 days, is standard.

This setting is a DB handler specific setting and is therefore only used if the eZSessionHandlerDB is set in the setting Handler in the block [Session]. For the PHP handler see note below.

This setting is case sensitive.

Notes on PHP-handler:
1. For the php-based session handler, you'll need to set the php.ini value of:

session.gc_maxlifetime=<int>

to something higher then default value of 1440 (24 minutes) to avoid session being garbage collected after 24 minutes. For example set it to 259200 for 3 days.

eZ Publish sets this value to value of SessionTimeout during execution, but if there are other applications then eZ Publish 4.4+ running on the same server, or if system is Debian Linux based (including Ubuntu), then you need to set this in php.ini as garbage collection happens outside of eZ Publish execution as well.

2. Session gc scripts / cronjobs in eZ Publish has no effect when you use PHP based handler.
You should instead change your php.ini settings to make sure they are cleared regular:
http://php.net/manual/en/session.configuration.php

3. On Debian based Linux distroes (including Ubuntu) there is a out of the box cronjob (/etc/cron.d/php5) which uses a script to determine session.gc_maxlifetime (/usr/lib/php5/maxlifetime).
This script only looks for session.gc_maxlifetime in /etc/php5/*/php.ini, so make sure you have placed your value there.

Examples

SessionTimeout=259200

259200 seconds, the equivalent of 3 days, is standard.

Frederik Holljen (01/02/2005 2:07 pm)

Xiongjie Chen (12/05/2011 11:17 am)

Ester Heylen, Geir Arne Waaler, André R., Xiongjie Chen


Comments