I have a PHP app written in codeIgniter. Getting some complaints from clients about the app timing out. Their session times out after two hours of inactivity and they can’t seem to remember that.
Is there a way and if so, how, to show a pop up message when a users session has timed out?
Thank you in advance.
PHPcannot display a pop up by itself, but you could probably have aJavaScriptquery the session status and display a pop up when the session is expired, or even better, count the time since the session opened and let the user know in advance that his session is about to time outIf you want change the duration of the session, see this line in your
config.php7200 is 120 minutes * 60 seconds. If you change it to
0, the session will not expire.To add a warning, the very simplest method would probably to add a
JavaScriptsimilar to