<p>I've used the PHP MVC framework Symfony to build an on-demand web app.</p>

<p>It has an annoying bug - the session expires after about 15-30 minutes of inactivity. There is a config directive to prevent session expiration but it does not work. Even workarounds such as <a href="http://robrosenbaum.com/php/howto-disable-session-timeout-in-symfony/" rel="nofollow noreferrer">this one</a> did not help me.</p>

<p>I intend not to migrate to Symfony 1.1 (which fixes this bug) in the foreseeable future.</p>

<p>Has anyone been there and solved it? I would be most grateful for a hint or two!</p>

[{'answer_id': 25209, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 0, 'selected': False, 'text': "<p>The company I work for has been using Symfony and the workaround that we've used is to trigger a warning with javascript before the user gets logged out. I suspect that there is a a way to make 'heartbeat' ajax calls to the server to trigger the timer to reset, but that may be a lot of trouble. I think that there may not be a full fix that's suitable for you though, except maybe re-writing the session handler.</p>\n\n<p>Sorry I couldn't be more specific, if I get the chance, I'll ask our Symfony devs if they know of a better solution.</p>\n"}, {'answer_id': 26200, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 3, 'selected': True, 'text': "<p>I looked into it, and my coworker agrees that a heartbeat page call should work, you just have to make sure that the action invoked does reset the session timer (things like ajax field completion don't do this on their own).</p>\n"}, {'answer_id': 483374, 'author': 'deresh', 'author_id': 11851, 'author_profile': 'https://Stackoverflow.com/users/11851', 'pm_score': 0, 'selected': False, 'text': '<p>you could always set timeout to some large number ( like 10 days or so )</p>\n\n<pre><code>all:\n  .settings:\n    timeout:    864000\n</code></pre>\n'}, {'answer_id': 1438989, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>You can use</p>\n\n<pre><code>all:\n  .settings:\n    timeout: false\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/25174', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2706/']