PHPackages                             jinnguyen/puja-session - 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. [Caching](/categories/caching)
4. /
5. jinnguyen/puja-session

ActiveLibrary[Caching](/categories/caching)

jinnguyen/puja-session
======================

Handle session save data, supported save to file, database, MemCache, Redis

v1.1.0(9y ago)046Apache License 2.0PHP

Since Nov 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jinnguyen/puja-session)[ Packagist](https://packagist.org/packages/jinnguyen/puja-session)[ RSS](/packages/jinnguyen-puja-session/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

puja-session v1.1.0
===================

[](#puja-session-v110)

Handle session save data, supported save to file, database, MemCache, Redis

Install

```
composer require jinnguyen/puja-session
```

Usage:

```
include '/path/to/vendor/autoload.php';
use Puja\Session\Session;
$session = new Session($configure);
$session->start();
```

**Configuration**

1. Basic configure:

```
$configure = array(
     'saveHandler' => File|Db, // default is File, you also can write saveHandler by your self
     'enabled' => false, // enabled Puja handle session system, if not the default session system will be used
     'ttl' => 0, // the number seconds session will be expired
     'options' => array(), // a list of session.* in php.ini, visit http://php.net/manual/en/session.configuration.php for full list
     'saveHandlerDir' => null, // the namespace to your SaveHandler folder, default: \Puja\Session\SaveHandler\
);
```

2. Base on each Save Handler will have some addition configures;
    a/ **File**:

- savePath: folder session will save to b/ **Db**:
- session\_table: the table name that will be stored the session data
- adapter\_name: the db adapter name is used for db (View  for more detail)
- create\_table: true/false, if true the system will check and create table when Session start. Recommend: enable for the first you launch application after that disable forever.

```
$configure = array(
      'saveHandler' => Db,
      'enabled' => true,
      'ttl' => 1440,
      'options' => array(),
      'saveHandlerDir' => null,
      'session_table' => 'puja_session_table',
      'create_table' => true,
 );
```

**Access Session**

```
$session = Session::getInstance('user');
$session->set('name', 'Jin'); // same with $_SESSION['user']['name'] = 'Jin';
$session->get('name'); // same with $_SESSION['user']['name'];
$session->getId(); // same with session_id()
$session->destroy(); // same with session_destroy();
$session->regenerateId($deleteOldSession); // same  with session_regenerate_id($deleteOldSession)
$session->getName($name); // same with session_name($name);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

3515d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25e5bd31b5dd70d47cbdc738bded06dbabfba3d584acce63c2c4b4fb7847f39d?d=identicon)[jinnguyen](/maintainers/jinnguyen)

---

Top Contributors

[![linhnmt](https://avatars.githubusercontent.com/u/10231628?v=4)](https://github.com/linhnmt "linhnmt (2 commits)")[![linhnnmt](https://avatars.githubusercontent.com/u/162856460?v=4)](https://github.com/linhnnmt "linhnnmt (1 commits)")

---

Tags

sessionpuja

### Embed Badge

![Health badge](/badges/jinnguyen-puja-session/health.svg)

```
[![Health](https://phpackages.com/badges/jinnguyen-puja-session/health.svg)](https://phpackages.com/packages/jinnguyen-puja-session)
```

###  Alternatives

[duncan3dc/helpers

A collection of useful helper classes

13188.0k](/packages/duncan3dc-helpers)[jrschumacher/symfony-redis-session-handler

Redis Session Handler Symfony HttpFoundation Component

1262.1k](/packages/jrschumacher-symfony-redis-session-handler)[karriere/state

Laravel package for storing current application state in cache/session

1719.0k](/packages/karriere-state)[craftsys/laravel-redis-session-enhanced

Enhanced redis driver for sessions in Laravel

107.0k](/packages/craftsys-laravel-redis-session-enhanced)[dmitry-suffi/redis-session-handler

Обработчик сессий через Redis с механизмом блокировки

113.2k](/packages/dmitry-suffi-redis-session-handler)

PHPackages © 2026

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