Apache::Session::MySQLUser)Contributed Perl DocumenApache::Session::MySQL(3pm)
Apache::Session::MySQL - An implementation of Apache::Session
| 🎯 Use Case | ⚙️ Command | 📝 Description |
|---|---|---|
| Open new DB handles | tie %hash, 'Apache::Session::MySQL', $id, { DataSource => 'dbi:mysql:sessions', UserName => $db_user, Password => $db_pass, LockDataSource => 'dbi:mysql:sessions', LockUserName => $db_user, LockPassword => $db_pass }; | Opens new database handles for session storage and locking. |
| Use existing handles | tie %hash, 'Apache::Session::MySQL', $id, { Handle => $dbh, LockHandle => $dbh }; | Reuses existing database handles for session storage and locking. |
use Apache::Session::MySQL;
#if you want Apache::Session to open new DB handles:
tie %hash, 'Apache::Session::MySQL', $id, {
DataSource => 'dbi:mysql:sessions',
UserName => $db_user,
Password => $db_pass,
LockDataSource => 'dbi:mysql:sessions',
LockUserName => $db_user,
LockPassword => $db_pass
};
#or, if your handles are already opened:
tie %hash, 'Apache::Session::MySQL', $id, {
Handle => $dbh,
LockHandle => $dbh
};
This module is an implementation of Apache::Session. It uses the MySQL backing store and the MySQL locking scheme. See the example, and the documentation for Apache::Session::Store::MySQL and Apache::Session::Lock::MySQL for more details.
This module was written by Jeffrey William Baker <jwbaker AT acm.org>.
perl v5.30.3 2020-09-20 Apache::Session::MySQL(3pm)
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 09:16 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)