Hello All,
On an installation of mediawiki that we are running I've been tasked with trying to get mediawiki to keep users logged in over a larger period of time and across browser restarts. After poking around the code I think I can do this by increasing the lifetime of the session cookie by using session_set_cookie_params.
However in GlobalFunctions.php, wfSetupSession calls session_set_cookie_params like this:
session_set_cookie_params( 0, $wgCookiePath, $wgCookieDomain );
I can of course change this line to add in a lifetime value. However I find changing core code always causes problems when updating or patching.
My question is: Do you think it will be possible in a future release of MediaWiki to add a $wgCookieLifetime configuration variable that can be used in session_set_cookie_params. The default value in DefaultSettings.php can be set to 0 and then can be overridden in LocalSettings.php if required.
Thanks,
Paul.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
paul.edmondson@fifeventures.co.uk wrote:
Hello All,
On an installation of mediawiki that we are running I've been tasked with trying to get mediawiki to keep users logged in over a larger period of time and across browser restarts. After poking around the code I think I can do this by increasing the lifetime of the session cookie by using session_set_cookie_params.
The default is for the session cookie to last to the end of the browser session. You would probably have to deal with the session storage expiration, rather than the cookie.
- -- brion vibber (brion @ wikimedia.org)
Thanks for the heads up.
I am trying to have the session cookie to exist beyond the browser session and that is why I think I need to change the lifetime value of the session cookie using session_set_cookie_params(). I can already make the session storage longer by increasing the values of session.gc_maxlifetime in php.ini.
Changing session.cookie_lifetime in php.ini has no effect due to session_set_cookie_params() being called in GlobalFunctions.php, wfSetupSession(). This is why I was initially asking for a configuration parameter for $wgCookieLifetime to be added.
Thanks again for the response.
On 27 Jun 2007, at 15:36, Brion Vibber wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
paul.edmondson@fifeventures.co.uk wrote:
Hello All,
On an installation of mediawiki that we are running I've been tasked with trying to get mediawiki to keep users logged in over a larger period of time and across browser restarts. After poking around the code I think I can do this by increasing the lifetime of the session cookie by using session_set_cookie_params.
The default is for the session cookie to last to the end of the browser session. You would probably have to deal with the session storage expiration, rather than the cookie.
- -- brion vibber (brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGgnXwwRnhpk1wk44RAq8hAKDNemROulmGwe5rWDqC9sDhsmORVgCgutkt oCfiRB93MQqHcUwg2sAHSdE= =vYJM -----END PGP SIGNATURE-----
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org