2

Is there a middleware for sessions in PHP Slim Framework? If not, is there a lightweight session library that works well with the Slim Framework? Its important that the library supports session storage in a database (MySQL).

kaldimar
  • 337
  • 3
  • 16

3 Answers3

3

Slim session manager package can be used. It's available at:

https://github.com/yusukezzz/slim-session-manager

  1. Composer based installation
  2. Slim middleware
  3. Can be used with any database driver

Hope it helps.

anupam
  • 756
  • 5
  • 11
3

PHP native sessions can be database backed.

PHP sessions in Database

It's pretty easy to use native PHP sessions, not sure why you'd need a library.

Community
  • 1
  • 1
ckm
  • 1,326
  • 10
  • 15
0

According to their Session Docs, they only have

  • Native Session Store
  • Cookie Session Store

It doesn't appear to have a database backed session. Maybe its in development or maybe there is a 3rd party plugin for it.

Connor Tumbleson
  • 3,270
  • 2
  • 25
  • 37
  • I understand, but which library would you use for sessions then? It should be lightweight.. –  Jan 24 '14 at 00:22