PHPackages                             onesimus-systems/ossession - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. onesimus-systems/ossession

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

onesimus-systems/ossession
==========================

Centralized session management for PHP applications.

1.0.2(9y ago)187BSD-3-ClausePHP

Since Oct 11Pushed 9y agoCompare

[ Source](https://github.com/onesimus-systems/ossession)[ Packagist](https://packagist.org/packages/onesimus-systems/ossession)[ RSS](/packages/onesimus-systems-ossession/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

OSSession
---------

[](#ossession)

OSSession provides a centralized, database backed PHP session manager. It requires minimal setup and provides a reliable easy way to manage PHP sessions.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.4.0

Usage
-----

[](#usage)

```
use \Onesimus\Session\SessionManager

// First we need to register the session handler
$pdo = new PDO(...);
$options = [
	'timeout' => 6 // hours
	'gclotto' => [1, 100] // Chances a garbage collection will occur
	'table' => 'sessions' // Database table that houses the session data. It must have three fields called 'id', 'data', and 'last_accessed'. 'last_accessed' is an int as times are stored in Unix time.
];

SessionManager::register($pdo, $options);
SessionManager::startSession('php-session-name');

// Manipulate session data
SessionManager::set('userid', 2);
SessionManager::get('themename', 'default'); // get will either return the session value if it exists or whatever is passed as the second argument. By default it will return null if the session data doesn't exist.

SessionManager::clear(); // Clear a session
```

License
-------

[](#license)

OSSession is released under the BSD 3-clause license. The license text can be found in LICENSE.md.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~235 days

Total

3

Last Release

3437d ago

Major Versions

0.1.0 → 1.0.12017-01-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61299877?v=4)[dragonrider23](/maintainers/dragonrider23)[@DragonRider23](https://github.com/DragonRider23)

---

Top Contributors

[![lfkeitel](https://avatars.githubusercontent.com/u/6619743?v=4)](https://github.com/lfkeitel "lfkeitel (6 commits)")

---

Tags

phpsession-managementsessionssession

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onesimus-systems-ossession/health.svg)

```
[![Health](https://phpackages.com/badges/onesimus-systems-ossession/health.svg)](https://phpackages.com/packages/onesimus-systems-ossession)
```

###  Alternatives

[laminas/laminas-session

Object-oriented interface to PHP sessions and storage

8223.7M126](/packages/laminas-laminas-session)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233990.5k16](/packages/bryanjhv-slim-session)[plasticbrain/php-flash-messages

A modern take on PHP session-based flash messages

184229.7k8](/packages/plasticbrain-php-flash-messages)[rairlie/laravel-locking-session

Provide session locking in Laravel

91483.0k1](/packages/rairlie-laravel-locking-session)[vcian/pulse-active-sessions

A Laravel Pulse card to show active user session.

11377.7k](/packages/vcian-pulse-active-sessions)[theodo-evolution/session-bundle

The "Theodo Evolution Session Integration" bundle

46214.7k](/packages/theodo-evolution-session-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
