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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ovunctukenmez/samesite-session-starter

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

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

This class enables samesite session\_start.

12699PHP

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 today

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

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity35

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://avatars.githubusercontent.com/u/6099553?v=4)[ovunc tukenmez](/maintainers/ovunctukenmez)[@ovunctukenmez](https://github.com/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)
```

###  Alternatives

[davmixcool/php-sentiment-analyzer

PHP Sentiment Analyzer is a lexicon and rule-based sentiment analysis tool that is used to understand sentiments in a sentence using VADER (Valence Aware Dictionary and sentiment Reasoner).

134180.9k1](/packages/davmixcool-php-sentiment-analyzer)[prestashop/decimal

Object-oriented wrapper/shim for BC Math PHP extension. Allows for arbitrary-precision math operations.

179.1M9](/packages/prestashop-decimal)

PHPackages © 2026

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