Possible Duplicate:
PHP sessions timing out to quickly
In my .htaccess file I have set
php_value session.gc_maxlifetime 14400
i.e. for 4 hours
if I verify using echo ini_get('session.gc_maxlifetime'); I get 14400. But still my session expires in, say, less than 2 hours.
What do you think is going wrong here? any help appreciated. Thanks
Some distributions (Debian, at least) have a cronjob that removes old sessions a regular interval. This cronjob gets the
session.gc_maxlifetimesetting from the system’s php.ini and thus ignore your vhost config.Solutions:
session.gc_maxlifetimein the system’s php.int (e.g./etc/php5/apache2/php.ini)session.save_path)session.cookie_lifetimevariable is at least equal tosession.gc_maxlifetime(or0).