NAME
Apache::Session::DBIStore - Session persistence via DBI
SYNOPSIS
DESCRIPTION
Apache::Session::DBIStore is a backing store module for Apache::Session. Session data is stored in a DBI-accessible database.
SCHEMA
To use this module, you will need these columns in a table called 'sessions':
id char(16)
length int(11)
a_session text
Where the a_session column needs to be able to handle arbitrarily long binary data.
CONFIGURATION
When using DBI, the module must know what datasource, username, and password to use when connecting to the database. These values can be set for all sessions by using package globals, or for each individual session using the options hash (see Apache::Session documentation). The options are:
Package globals:
- $Apache::Session::DBIStore::DataSource
- $Apache::Session::DBIStore::UserName
- $Apache::Session::DBIStore::Password
Corresponding options:
- DataSource
- UserName
- Password
Example with options:
tie %hash, 'Apache::Session::DBI', $id, {
DataSource => 'dbi:driver:database',
UserName => 'database_user',
Password => 'K00l'
};
Example with package globals:
$Apache::Session::DBIStore::DataSource = 'dbi:driver:database';
$Apache::Session::DBIStore::UserName = 'database_user';
$Apache::Session::DBIStore::Password = 'K00l';
tie %hash, 'Apache::Session::DBI', $id;