Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
change ini_set('session.cookie_lifetime', 2000000);
change the "2000000" to whatever you want, in seconds. 0 will mean Drupal kills the cookie on browser exit.
Comments
In /sites/default
edit settings.php
change
ini_set('session.cookie_lifetime', 2000000);change the "2000000" to whatever you want, in seconds. 0 will mean Drupal kills the cookie on browser exit.
you might also need to change a few other settings
like cache_expire and gc_maxlifetime.
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 2000000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 2000000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
More info here...
Nice to know what the settings are, also nice to know what they do...look here:
http://php.net/manual/en/session.configuration.php