detain / session-samurai
🥷 Universal high-speed asynchronous (non-blocking) SessionHandlerInterface implementation for PHP supporting Semaphores, Mysqli, Redis, SQLite3, Symfony/Cache, WinCache, PhpFastCache, PHP-Cache, PDO, Memcached, FlySystem Filesystem, Illuminate, APCu, APC, OpCache, InfluxDB, WinCache, MongoDb and loc
Requires
- php: >=5.3.0
- ext-session: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-03 10:55:15 UTC
README
Universal high-speed asynchronous (non-blocking) SessionHandlerInterface implementation for PHP supporting Semaphores, Mysqli, Redis, SQLite3, Symfony/Cache, WinCache, PhpFastCache, PHP-Cache, PDO, Memcached, FlySystem Filesystem, Illuminate, APCu, APC, OpCache, InfluxDB, WinCache, MongoDb and local file storage.
"Session handling is like a sword fight
You must think first before you move
When it's properly used it's almost invincible"
Project Status
Session Samurai 🥷 is fresh off the block and is still figuring out what it wants to do with its life. Soon it will grow into a mega-hotie that does the same stuff others do, only he makes it look good.
Installation
Use composer to include the save handler in your application.
composer requre detain/session-samurai
Usage
require 'vendor/autoload.php'; // set up autoloading using composer $memcached = new \Memcached(); // create connection to memcached $memcached->addServer('localhost', 11211); $handler = new \Detain\SessionSamurai\MemcachedSessionHandler($memcached); session_set_save_handler($handler, true);
Development notes
Related sites with possibly good reference material
- PHP: SessionHandlerInterface - Manual
- PHP: session_set_save_handler - Manual
- PHP: Securing Session INI Settings - Manual
- Session Handler Life Cycle: A complete overview of the php session handler life cycle]
- 1ma/RedisSessionHandler: An alternative Redis session handler for PHP featuring per-session locking and session fixation protection
- cballou/MongoSession: A PHP session handler wrapped around MongoDB.
- josantonius/php-session: PHP library for handling sessions
- psr7-sessions/storageless: storage-less PSR-7 session support
- ramazancetinkaya/session-handler: A PHP library for secure session handling.
- davidlienhard/sessionhandler: 🐘 php sessionhandler using database connection
- zahycz/sessionless: Non-I/O blocking SessionHandler implementation using Nette/Caching
- javis/php-memcached-sessions: A PHP session handler that uses memcached to store session with multiple servers, failover and replication support.
- PHP Cache - PHP-Cache Documentation
- The Cache Component (Symfony Docs)
- The Lock Component (Symfony Docs)