php-platform / web-session
Requires
- php: >=5.4
- php-platform/session: ~0.1
Requires (Dev)
- guzzlehttp/guzzle: ~3.8
- php-platform/mock-config: ~0.1
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2024-12-21 21:03:20 UTC
README
This packages implements the Session interface from php-platform/session package for web
Introduction
A session can be created for a web application or can be for command lines This package implements the Session for web
Usage
confugure `PhpPlatform\WebSession\Session
as the
session.class in [php-platform/session](https://github.com/PHPPlatform/session)
config.json`
{
"session":{
"class":"PhpPlatform\\WebSession\\Session"
}
}
Configuration
salt
salt is used to encrypt session file name from actual session id
$sessionFileName = md5($salt.$sessionId);
path
path is the uri path on which this session cookie must be set, this value is sent as Set-Cookie's path parameter
timeout
Session timeout in seconds , this value is used to calculate Set-Cookie's expires and Max-Age parameters
name
name of the session , this is the cookie name sent to the client
sessionFilePrefix
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
Scripts
delete-expired-sessions
to delete the expired session files , run this script (manually or in a cron job) in regular intervals
$ ./vendor/bin/delete-expired-sessions