Skip to content

pematon/mysql-session-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Session handler

Custom PHP session handler for Nette Framework that uses MySQL database for storage.

Requirements

  • PHP 8.1+

Installation

Preferred way to install pematon/mysql-session-handler is by using Composer:

$ composer require pematon/mysql-session-handler:~2.0

Setup

After installation:

  1. Create the table session using SQL in sql/create.sql.

  2. Register an extension in config.neon:

extensions:
    sessionHandler: Pematon\Session\DI\MysqlSessionHandlerExtension
  1. Configure custom table name:
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).

About

Custom PHP session handler for Nette Framework that uses MySQL database for storage.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages