Skip to content

ifavo/Zend-Framework-Session-Handler--HandlerSocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Allows the usage of the php-handlersocket extension ("Percona's noSQL for MySQL") (http://code.google.com/p/php-handlersocket/) as Session Save Handler in the Zend Framework.

The save handler is basically the same as in the example codes.

Example usage:

In your Bootstrap.php

[..]
protected function _initSessionHandler () {
	Zend_Session::setSaveHandler( new favo_Session_SaveHandler_HandlerSocket(
					array(
						'server' => array(
									'host' => 'localhost',
									'port' => 9999,
									'dbname' => 'misc',
									'dbtable' => 'session'
								)
							)
						)
					);
}
[..]


The MySQL Table structure is:

CREATE DATABASE IF NOT EXISTS `misc`;
CREATE TABLE IF NOT EXISTS `misc`.`session` (
  `id` varchar(32) NOT NULL DEFAULT '' COMMENT 'session id',
  `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'last modification time',
  `data` varchar(6000) DEFAULT NULL COMMENT 'the session data',
  PRIMARY KEY (`id`),
  KEY `modified` (`modified`)
) ENGINE=InnoDB;

About

Session Handler based on the HandlerSocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages