CGI::Session::Driver::db_file — CGI::Session driver for BerkeleyDB using DB_File
| Use Case | Command | Description |
|---|---|---|
| 🔧 Create session with default file | $s = CGI::Session->new("driver:db_file", $sid); |
📁 Stores session data in /tmp/cgisess.db (or equivalent) |
| 📁 Custom session file | $s = CGI::Session->new("driver:db_file", $sid, {FileName=>'/tmp/cgisessions.db'}); |
🗂️ Specify a different BerkeleyDB file path |
| 🔐 Set file permissions | $s = CGI::Session->new("driver:db_file", $sid, {UMask=>0660}); |
🛡️ Override default umask (0660) when creating the DB file |
$s = CGI::Session->new("driver:db_file", $sid);
$s = CGI::Session->new("driver:db_file", $sid, {FileName=>'/tmp/cgisessions.db'});
db_file stores session data in BerkeleyDB file using DB_File Perl module. All sessions will be stored in a single file, specified in FileName driver argument as in the above example. If FileName isn't given, defaults to /tmp/cgisess.db, or its equivalent on a non-UNIX system.
If the directory hierarchy leading to the file does not exist, it will be created for you.
This module takes a UMask option which will be used if DB_File has to create the database file for you. By default the umask is 0660.
For support and licensing information see CGI::Session.
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-08 10:33 @216.73.216.158
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format