PHPackages                             locosoftworks/php-cookie-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. locosoftworks/php-cookie-session

ActiveLibrary

locosoftworks/php-cookie-session
================================

Session save handler used to store the session in a cookie

024PHP

Since Jul 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/moranjk/PHPCookieSession)[ Packagist](https://packagist.org/packages/locosoftworks/php-cookie-session)[ RSS](/packages/locosoftworks-php-cookie-session/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Cookie Session Handler
======================

[](#cookie-session-handler)

### Requires

[](#requires)

- PHP &gt;= 5.3

### Composer Install

[](#composer-install)

```
"minimum-stability": "dev",
"require": {
    "locosoftworks/php-cookie-session": "dev-master"
}

```

### Usage

[](#usage)

```
$handler = new Loco\Session\SaveHandler\ClientSession();

```

It is recommended that you encrypt the session. Create a class that implements `Loco\Crypt\CipherInterface` and inject it into the session handler

```
$handler->setCipher($myEncryptionClass);

```

Set the session save handler using `session_set_save_handler()` (see [php documentation](http://www.php.net/manual/en/function.session-set-save-handler.php))

```
session_set_save_handler(
    array($handler, 'open'),
    array($handler, 'close'),
    array($handler, 'read'),
    array($handler, 'write'),
    array($handler, 'destroy'),
    array($handler, 'gc')
);

session_start();

```

You **MUST** call `session_write_close` **BEFORE** returning any output. [Output Buffering](http://www.php.net/manual/en/book.outcontrol.php) is recommended.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd9d6d1eebbd034a31da56e1e253bc6fba8fb00b4c8516efae5c2dea5ac0478e?d=identicon)[moranjk](/maintainers/moranjk)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/locosoftworks-php-cookie-session/health.svg)

```
[![Health](https://phpackages.com/badges/locosoftworks-php-cookie-session/health.svg)](https://phpackages.com/packages/locosoftworks-php-cookie-session)
```

PHPackages © 2026

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