I have a page that is open (i.e. requires no login) and allows users to give quick feedback. This page is available on a single shared PC or tablet. The form itself has a CSRF token on it.
Problem is that the time between people submitting responses could be longer than the PHP session time. Solutions seem to be:
- using a meta refresh to reload the page every 15 mins (could refresh while someone was giving feedback, so not great)
- remove the CSRF token protection (so reducing the security)
- adding a javascript timer on the page to only reload the page after 15 mins or no mouse or keyboard input.
Is there another way of dealing with this?
session.gc_maxlifetimeto a larger timeout. The problem described there is that you shouldn't rely upon the PHP GC to time out your session on the server side, because it may not do so immediately after the configured time. It should never time it out before that time. – Polynomial Jul 01 '15 at 15:52