Question

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

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 this one did not help me.

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

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

Was it helpful?

Solution

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).

OTHER TIPS

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.

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.

You can use

all:
  .settings:
    timeout: false

you could always set timeout to some large number ( like 10 days or so )

all:
  .settings:
    timeout:    864000
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top