Apache...Sybase(3pm)
π NAME π
Apache::Session::Store::Sybase β bestie, this one stores your persistent data in a Sybase database. That's it, that's the whole job. π
This is a Perl module, so it lives in section 3pm of the manual, and the page itself is titled Apache...Sybase(3pm) if you're out here hunting for it in man. π¦
β¨ SYNOPSIS β¨
Okay so this is literally how you use it:
use Apache::Session::Store::Sybase;
my $store = new Apache::Session::Store::MySQL;
$store->insert( $ref );
$store->update( $ref );
$store->materialize( $ref );
$store->remove( $ref );
Not me pointing out that the synopsis says Apache::Session::Store::MySQLβ¦ yeah. That's what the page says, so that's what you're getting, no cap. Copy it character for character and don't come for me. π
πΈ DESCRIPTION πΈ
Apache::Session::Store::Sybase is the plug that fulfills the storage interface of Apache::Session. Your session data goes into a Sybase database and it justβ¦ lives there. Main character storage energy. π
π SCHEMA π
To use this module you need at least these columns in a table called 'sessions':
id CHAR(32) # or however long your session IDs are.
a_session IMAGE
And if you wanna create that schema, you can run this command with the isql or sqsh programs:
CREATE TABLE sessions (
id CHAR(32) not null primary key,
a_session TEXT
)
go
If you're using some other command to do it, bestie, make sure there's a unique index on the id column of the table. That part is not optional, it's giving non-negotiable. π«Ά
π CONFIGURATION π
The module needs to know what datasource, username, and password to use when connecting to the database. You can set these values with the options hash (peep the Apache::Session documentation for that). The options are:
DataSourceUserNamePassword
Example, slay:
tie %hash, 'Apache::Session::Sybase', $id, {
DataSource => 'dbi:Sybase:database=db;server=server',
UserName => 'database_user',
Password => 'K00l',
Commit => 1,
};
Alternatively β iconic behaviour honestly β you may pass in an already-opened DBI handle to your database:
tie %hash, 'Apache::Session::Sybase', $id, {
Handle => $dbh
};
And there's extra arguments you can pass to the backing store:
Commitβ whether we should commit any changes. If you pass in an already-open database handle that hasAutoCommitset to a true value, you don't need to set this. But if you letApache::Session::Store::Sybasecreate your database handle, you must set this to a true value, otherwise your changes will not be saved. That's the drama. πtextsizeβ the value we should pass to the'set textsize 'command that sets the max size of theIMAGEfield. Default is32K(at least in Sybase ASE 11.9.2). π
π AUTHOR π
This module was based on Apache::Session::Store::Oracle, which was written by Jeffrey William Baker <jwbaker@acm.org>. It was then modified by Chris Winters <chris@cwinters.com> to work with Apache::Session 1.5+, with changes from an earlier version of Apache::Session::DBI::Sybase from Mark Landry <mdlandry@lincoln.midcoast.com>. Look at all that lineage, it's giving family tree. π³β¨
β SEE ALSO β
Apache::Session
And that's the whole page, bestie, you ate it. π This one's from the User Contributed Perl Documentation collection, running under perl v5.36.0, dated 2022-11-19 β so go forth and store your sessions, periodt. ππ¦π§
π¦ where this page comes from
- debian bookworm: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms