https://github.com/pematon/mysql-session-handler
Custom PHP session handler for Nette Framework that uses MySQL database for storage.
https://github.com/pematon/mysql-session-handler
nette
Last synced: 6 months ago
JSON representation
Custom PHP session handler for Nette Framework that uses MySQL database for storage.
- Host: GitHub
- URL: https://github.com/pematon/mysql-session-handler
- Owner: pematon
- License: mit
- Created: 2014-12-03T15:31:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-24T15:41:34.000Z (over 2 years ago)
- Last Synced: 2025-08-05T15:25:15.587Z (11 months ago)
- Topics: nette
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 8
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MySQL Session handler
Custom PHP session handler for [Nette Framework](http://nette.org/) that uses MySQL database for storage.
## Requirements
- PHP 8.1+
## Installation
Preferred way to install pematon/mysql-session-handler is by using [Composer](http://getcomposer.org/):
```sh
$ composer require pematon/mysql-session-handler:~2.0
```
## Setup
After installation:
1) Create the table `session` using SQL in [sql/create.sql](sql/create.sql).
2) Register an extension in config.neon:
```neon
extensions:
sessionHandler: Pematon\Session\DI\MysqlSessionHandlerExtension
```
3) Configure custom table name:
```neon
sessionHandler:
tableName: session
```
## 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).