Session is stored in the database. When the session lifetime expires, you need to run a PHP script. How to do it?

  • why do you need to call the php script? can just do a job? - plesser
  • need to notify all listeners which user the session ended with - Andrew
  • brp php is running on the server side. when running the script in php, if the user's session is not found, then it will have to be transferred to the page with authorization. And on the client side, you can implement a timer on JS which, for example, after a certain time has expired, if the user didn’t take any action, will try to redirect to the login page - plesser
  • it's not about authorization. The user must see the activity of other users - Andrey
  • So make a select from the database about the state of sessions every 30 seconds - plesser

0