Skip to content

nicodds/php-session-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

php-session-redis

This small script implements a quick and dirty Redis backend for your php session.

Essentially, it does nothing more than https://github.com/ivanstojic/redis-session-php, just something less, because for the sake of easiness we store only the base64 encoded session string.

So why to implement this backend? In redis-session-php, ivanstojic used Predis as the client library for handling the connection to Redis and that impose to have php version 5.3 or higher. Rediska seems to have more relaxed requirements for php version and so that’s the story!

Usage

Install Rediska and set the correct include in redis_session.php then you just have to require(_once) this file at the very beginning of your pages, then call session_start() when you need.

<?php
require_once('redis_session.php');

// ...

session_start();

$_SESSION['test'] = 1;

...

License

Released under the terms of the GNU GENERAL PUBLIC LICENSE version 3.

About

A Redis backend for your php session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages