/Session-PHP-Memcached

Provides a useful session handler using memcached for php

Primary LanguagePHPMIT LicenseMIT

PhpMemcachedSession

Provides a useful session handler using memcached for php

Codacy Badge Code Climate

This project requires either Memcached to work as a storage medium. memcache can be made to work, but will unlikely be the system of choice for most users.

How to use

Include the Initializer before starting a session and call run on it. It requires a callable , that can be used to change DI-Mappings or configuration.

Ini-Settings used

The required and proposed defaults can be set with the Configuration-Class.

session

  • serialize_handler: is required to be set to php_serialize
  • name: should be set to something less obviously php
  • use_cookies: should be set to true
  • use_only_cookies: should be set to true

yetanotherwebstack_session

  • memcache_server: defaults to localhost
  • memcache_port: defaults to 11211
  • sid_pepper: defaults to "this is not quite secret" and should be changed
  • memcache_user: no default, only use if the memcache is password protected
  • memcache_password: no default, only use if the memcache is password protected
  • serializer: a callable to serialize the session
  • unserializer: a callable to unserialize the session