PHP Classes

Distributed Session Manager: Manage sessions using distributed MySQL servers

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,688 All time: 2,336 This week: 488Up
Version License Categories
phpdsm 1.0GNU General Publi...Databases, User Management
Description 

Author

This class can be used as a replacement to the default PHP session manager class to store and retrieve sessions in distributed MySQL servers.

The class retrieves a list of MySQL server hosts from a configuration file in the INI format.

A random host is picked from the list to connect when it is necessary execute MySQL queries to store, retrieve, update or delete session data.

The MySQL server host connection timeout is set to a configurable value, so the class can skip a busy server and try connecting the next host in the list.

The session data may be stored on multiple servers at once to provide greater redundancy.

Innovation Award
PHP Programming Innovation award nominee
August 2006
Number 7


Prize: One subscription to the PHP Magazine
By default, user access session data is stored in files. However, in a clustered server environment, file storage is not very convenient.

Even when files are available to all cluster servers via a networked file system, it may cause data corruption if the session files are not locked from concurrent accesses. Networked file system locks may cause excessive delays.

This class provides an alternative solution by distributing session data storage using a MySQL database. It avoids some of the inconveniences of the concurrent accesses to session data stored in a networked file system.

Manuel Lemos
Picture of Robin
Name: Robin <contact>
Classes: 3 packages by
Country: The Netherlands The Netherlands
Innovation award
Innovation award
Nominee: 3x

Screenshots (1)  
  • sessions.png
  Files folder image Files (3)  
File Role Description
Plain text file sessionmanager.php Class The Session Manager class
Accessible without login HTML file phpdsm.html Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,688
This week:0
All time:2,336
This week:488Up