wincorex / mysql-session-handler
MySQL session handler for Nette Framework
v1.2.1
2018-03-24 14:26 UTC
Requires
- php: >=5.4
- nette/database: >=2.2
- nette/di: >=2.2
This package is auto-updated.
Last update: 2024-10-13 21:24:33 UTC
README
Custom PHP session handler for Nette Framework that uses MySQL database for storage.
Requirements
- nette/database 2.4+
- PHP 7.2+
Installation
Preferred way to install wincorex/mysql-session-handler is by using Composer:
$ composer require wincorex/mysql-session-handler:~dev-master
Setup
After installation:
-
Create the table sessions using SQL in sql/create.sql.
-
Register an extension in config.neon:
extensions: sessionHandler: Wincorex\Session\DI\MysqlSessionHandlerExtension sessionHandler: tableName: 'web_session' jsonDebug: true
Original source code
- Pematon GitHub
- MD5 hash is not applicated for easy debugging
Features
- For security reasons, Session ID is stored in the database as an MD5 hash.
- Multi-Master Replication friendly (tested in Master-Master row-based replication setup).