0

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.

Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42

1 Answers1

1

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

Community
  • 1
  • 1
Marcel Burkhard
  • 3,453
  • 1
  • 29
  • 35