PHPPlatform/web-session

Repository files navigation

This packages implements the Session interface from php-platform/session package for web

build statuscoverage report

A session can be created for a web application or can be for command lines This package implements the Session for web

confugure PhpPlatform\WebSession\Session as the session.class in php-platform/session config.json

{
    "session":{
        "class":"PhpPlatform\\WebSession\\Session"
    }
}

salt is used to encrypt session file name from actual session id

$sessionFileName = md5($salt.$sessionId);

path is the uri path on which this session cookie must be set, this value is sent as Set-Cookie's path parameter

Session timeout in seconds , this value is used to calculate Set-Cookie's expires and Max-Age parameters

name of the session , this is the cookie name sent to the client

this is the prefix for session file names for this application , since all the session files are stored in same directory , this helps to categories the session files for each application

to delete the expired session files , run this script (manually or in a cron job) in regular intervals

$ ./vendor/bin/delete-expired-sessions