# man > Apache::Session::DB_File

---
type: CommandReference
command: Apache::Session::DB_File
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `use Apache::Session::DB_File; tie %hash, 'Apache::Session::DB_File', $id, {...}` — open a session tied hash backed by DB_File with file locking

## Name

Apache::Session::DB_File — An implementation of Apache::Session using DB_File for storage and File for locking.

## Synopsis

perl
use Apache::Session::DB_File;

tie %hash, 'Apache::Session::DB_File', $id, {
   FileName      => 'sessions.db',
   LockDirectory => '/var/lock/sessions',
};
## Options

- `FileName` — path to the database file (required)
- `LockDirectory` — directory for lock files (required)

## See Also

- [Apache::Session::File](https://metacpan.org/pod/Apache::Session::File)
- [Apache::Session::Flex](https://metacpan.org/pod/Apache::Session::Flex)
- [Apache::Session::MySQL](https://metacpan.org/pod/Apache::Session::MySQL)
- [Apache::Session::Postgres](https://metacpan.org/pod/Apache::Session::Postgres)
- [Apache::Session](https://metacpan.org/pod/Apache::Session)
- [Apache::Session::Store::DB_File](https://metacpan.org/pod/Apache::Session::Store::DB_File)
- [Apache::Session::Lock::File](https://metacpan.org/pod/Apache::Session::Lock::File)