---
name: "Apache::Session::DBIStore"
section: "3pm"
platform: "linux"
package: "libapache-session-perl"
version: "1.03-2"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/Apache::Session::DBIStore"
---

# Apache::Session::DBIStore(3pm)

Session persistence via DBI

## 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;
```
