netom / php-riak-session
PHP session handler with Riak backend
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/netom/php-riak-session
Requires
- php: >=5.4.0
- ext-curl: >5
This package is auto-updated.
Last update: 2025-09-26 05:29:24 UTC
README
Riak-session is a very simple session handler plugin for PHP.
It uses the HTTP interface and the CURL extension to communicate with a Riak cluster.
The session handler only works with one node, no failover capability is provided here. Use HaProxy or an application-local Riak node to increase availability.
If you'd like to make use of the gc() method of the save handler, you have to configure Riak with a backend that supports secondary indexes. Alternatively, you can setup BitCask (for example) with expiry to automatically retire old sessions.
Usage
Use composer to include 'netom/php-riak-session'.
Use the code below to register a riak session handler instance, and get the actual handler instance in a signle line:
$h = \Netom\Session\Riak::register();
See the code for parameters.
The default is to connect to the localhost, and to the 'default' bucket type, and 'session' bucket.
The time() is stored to a t_int indexed field for every session.