NAME
OpenInteract::Session::DBI - Create sessions within a DBI data source
SYNOPSIS
# In your configuration file
[session_info]
class = Apache::Session::MySQL
...
[system_alias]
session = OpenInteract::Session::DBI
# Use a different datasource
[db_info session_storage]
db_owner =
username = webuser
password = s3kr1t
dsn = dbname=sessions
db_name =
driver_name = Pg
sql_install =
long_read_len = 65536
long_trunc_ok = 0
[session_info]
class = Apache::Session::Postgres
datasource = session_storage
...
[system_alias]
session = OpenInteract::Session::DBI
DESCRIPTION
Provide a '_create_session' method for OpenInteract::Session so we can use a DBI data source as a backend for Apache::Session.
Note that failure to create the session throws a '310' error, which clears out the session cookie so it does not keep happening. (See OpenInteract::Error::System for the code.)
Note that former users of OpenInteract::Session::MySQL
(now defunct) should have no problems using this class -- just specify the 'session_class' as Apache::Session::MySQL and everything should work smoothly.
If you want to use SQLite as a backend, see OpenInteract::Session::SQLite.
METHODS
_create_session( $session_id )
Overrides the method from parent OpenInteract::Session to take a session ID and retrieve a session from the datastore. We use the following configuration information:
session_info.class ($)
Specify the session serialization implementation class -- e.g., Apache::Session::MySQL, Apache::Session::Postgres, etc.
session_info.datasource ($) (optional)
Use a datasource different from that specified in 'datasource.default_connection_db'.
session_info.params (\%) (optional)
Parameters that get passed directly to the session serialization implementation class. These depend on the implementation.
BUGS
None known.
TO DO
Nothing.
SEE ALSO
COPYRIGHT
Copyright (c) 2001-2002 intes.net, inc.. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Chris Winters <chris@cwinters.com>