PHP session timeout

The developers of PHP has, in their infinite wisdom, decided that the default session timeout should be 24 minutes (1440 seconds).

This means that if you have a MediaWiki wiki and are editing a single page for half an hour and then click the save button, you are logged out and all your changes are lost. I just learned this the hard way.

Fortunately, you can change this with the session.gc_maxlifetime parameter in php.ini. So set this to a higher – more sane – value, such as 86400 (24 hours).

This entry was posted in PHP, web. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *



(this is a captcha)