I want to protect my application a bit, especially I want to improve the way sessions are handled. So, at this moment I know a few facts:
session_regenerate_id(false) does not destroy the old sessionsession_regenerate_id(true) destroys the old session. With a normal page reload, there is nothing wrong with using session_regenerate_id(true) .
However, when creating dozens of concurrent AJAX requests, there may be a problem that leads to the object destruction failed error message.
So there is nothing more to do, then use session_regenerate_id(false) in the AJAX request.
But you need to somehow note the previous obsolete sessions, which become obsolete as a result of calling session_regenerate_id(false) , as “zombie” sessions that will be destroyed in some way and will not mutate the folder sessions.
I need some practical advice on how to implement this.
source share