Skip to content

ntemple/DynamoDBSession

 
 

Repository files navigation

WORK IN PROGRESSJUST BEGINNNG

Cloned from the MongoDB session, and not yet updated

PHP DynamoDB Session Driver

About

  • PHP Sessions stored within Amazon’s DynamoDB.
  • Supports session locking so it is safe to use with AJAX apps.
  • Super duper easy to use.

This library is based on work originally from mostlygeek/MongoSession
which was based on work originally from halfdan/MongoSession.

Usage


<?php
require_once('./MongoSessionHandler.php');
MongoSessionHandler::register('session', 'session'); // db and collection
?>

By default MongoSessionHandler will connect to MongoDB running on localhost. To set up a custom environment that uses many servers do this:


<?php
require_once('./MongoSessionHandler.php');
$conf = array(
    // list of servers
    'servers' => array('mongo1:27017', 'mongo2:27017', 'mongo3:27017'),

    // options for connection
    'options' => array(
        'persist' => 'mongo-session',
        'replicaSet' => true
    )
);
MongoSessionHandler::register('session', 'session', $conf);
?>

When in doubt, read the code. Most of it is locking code and license comment anyways. :)

License

It’s MIT licensed.

About

A PHP session handler wrapped using MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%