wincorex/mysql-session-handler

MySQL session handler for Nette Framework

v1.2.1 2018-03-24 14:26 UTC

This package is auto-updated.

Last update: 2024-04-22 05:56:22 UTC


README

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

Requirements

Installation

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

$ composer require wincorex/mysql-session-handler:~dev-master

Setup

After installation:

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

  2. 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).