Clean session based data from DB when session is expired

Alexander Schranz

What is the best way to check in Symfony2 if a session (not the current) by sessionID is expired.

I have a database e.g. id|sessionId|someData and I want to create a command that remove all rows which sessions are expired.

Marcel Burkhard

If you're using the default symfony session handling which relies on php-sessions you're out of luck.

As soon as your session is expired you get a new one.

However if you access to the session save path you might try the accepted answer in this question:

Check if PHP session_id is in use

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to tell if a django DB-based session has expired in browser?

Session Expired when using Passportjs Facebook from Facebook App in IOS

Clear session data perodically from db

Get data from database based on session

Session validation filter which logs off the user when session is expired

Flask: when to use session vs. storing user data in db?

how to prevent bootstrap modal popup from opening login screen in it when session gets expired in MVC5

"Session expired" not working in Wicket

NullPointerException on expired session

Datasnap session has expired

Session Timeout not expired

Django session partially expired

Tomcat session expired handling

SQLAlchemy scoped_session is not getting latest data from DB

How to get data from db and how does the session work in laravel?

Display data in view based on session

How can i get data from database based on the session?

How to redirect to Login page when Session is expired in Java web application?

Throwing an exception when a user session has expired or returning null

Session always expired in Spring when adding web.xml configuration

Kendo grid not redirecting to login page when session is expired

When Session will be Expired in Asp.net or Asp.Net MVC?

Aumomatic redircting to login page when the session is expired in servlet

Xcode 8.0, session expired when tried to login with Apple id

Redirect User to Login Page When Token Session Expired - Laravel 5.8

Is there a way to have a function run when a session is created or expired?

Silverpop data transfer via curl returns Session expired or invalid

Sending "Authentication Required Message" when not authenticated and "Session has expired" when session is timed out

"Accessing expired session" exception from DistributedSession in ASP.Net Core