PHPackages                             ovunctukenmez/samesite-session-starter - 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. ovunctukenmez/samesite-session-starter

ActiveLibrary

ovunctukenmez/samesite-session-starter
======================================

This class enables samesite session\_start.

12699[1 issues](https://github.com/ovunctukenmez/SameSiteSessionStarter/issues)PHP

Since Apr 2Pushed 6y ago3 watchersCompare

[ Source](https://github.com/ovunctukenmez/SameSiteSessionStarter)[ Packagist](https://packagist.org/packages/ovunctukenmez/samesite-session-starter)[ RSS](/packages/ovunctukenmez-samesite-session-starter/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

SameSiteSessionStarter
======================

[](#samesitesessionstarter)

This PHP class enables samesite supported php session by modifying header created by session\_start function. The browser agent is also checked against incompatible list of browsers.

USAGE
-----

[](#usage)

start samesite none php session

```
require_once 'SameSiteSessionStarter.php';
SameSiteSessionStarter::session_start();

```

start samesite strict secure php session

```
require_once 'SameSiteSessionStarter.php';
SameSiteSessionStarter::$samesite = 'Strict';
SameSiteSessionStarter::$is_secure = true;
SameSiteSessionStarter::session_start();

```

Composer
--------

[](#composer)

```
composer require ovunctukenmez/samesite-session-starter

```

NOTES
-----

[](#notes)

SameSite=None (default setting) works only with Secure cookies.
So please make sure to use https protocol to start session correctly.

If you have previous started session with old settings, you need to clear its cookie first so new cookie can be set with the session\_start() function.
Here is an example to clear previous session cookie programmatically with [SameSiteCookieSetter](https://github.com/ovunctukenmez/SameSiteCookieSetter).

```
// https://github.com/ovunctukenmez/SameSiteCookieSetter
require_once 'SameSiteCookieSetter/SameSiteCookieSetter.php';

session_start();

$params = session_get_cookie_params();
$samesite_session_cookie_params = array(
    'samesite' => 'None',
    'secure' => true,
    'expires' => time() - 3600,
    'path' => $params['path'],
    'domain' => $params['domain'],
    'httponly' => isset($params['httponly']) ? $params['httponly'] : false
);

SameSiteCookieSetter::setcookie(session_name(),session_id(),$samesite_session_cookie_params);

```

To set samesite cookies, you can use [SameSiteCookieSetter](https://github.com/ovunctukenmez/SameSiteCookieSetter).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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/29626bc65e31161a47312908b69e9094cb43c1a287ea4f3528989fd6f905eeb4?d=identicon)[ovunctukenmez](/maintainers/ovunctukenmez)

---

Top Contributors

[![ovunctukenmez](https://avatars.githubusercontent.com/u/6099553?v=4)](https://github.com/ovunctukenmez "ovunctukenmez (12 commits)")

### Embed Badge

![Health badge](/badges/ovunctukenmez-samesite-session-starter/health.svg)

```
[![Health](https://phpackages.com/badges/ovunctukenmez-samesite-session-starter/health.svg)](https://phpackages.com/packages/ovunctukenmez-samesite-session-starter)
```

PHPackages © 2026

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