PHP Classes

Locked Session Handler: Session handler with variable locking support

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 33%Total: 2,164 All time: 1,808 This week: 386Up
Version License Categories
session 1.0GNU Lesser Genera...User Management


This class is custom session handler that allows for values stored in the session variables to be locked to prevent changes.

The class provides functions to set, retrieve, check and delete session variable values, as well functions to lock and unlock given session variables.

The names of locked variables are added to a special session variable array. If a script attempts to changes or delete locked session variables, they are not changed and the class will issue a non-fatal error notice.

Innovation Award
PHP Programming Innovation award nominee
September 2004
Number 4

Prize: One copy of the PHP Anthology book set
The capability to manage user session information is an important and popular feature of multi-user PHP applications.

Sometimes it is necessary to set session variables that should not be changed throughout the session lifetime, like for instance application constants or session fixed values, such as the current session user name, or even values that should not be changed because the user access is in a state that requires that some variable be locked against changes.

However, an application may accidentally attempt to change session variables that should not be changed due to bugs or concurrency situations that were not predicted.

This class implements a wrapper around the access to session variables to implement locking mechanisms and detect situations of invalid change attempts that are due to bugs that need to be fixed.

Manuel Lemos
Picture of brolewis
Name: brolewis <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 1408209 in United States United States
Week rank: 389 Up44 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file session.class.php Class Main Session Class
Accessible without login Plain text file sessionTest.php Example Example

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,808
This week:386Up
 User Ratings  
 All time