data/TWiki/CGISessionDriverSqliteDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
     1 ---+ Package ==
     2 
     3 %TOC%
     4 =head1 NAME
     5 
     6 CGI::Session::Driver::sqlite - CGI::Session driver for SQLite
     7 
     8 =head1 SYNOPSIS
     9 
    10     $s = new CGI::Session("driver:sqlite", $sid, {DataSource=>'/my/folder/sessions.sqlt'});
    11     $s = new CGI::Session("driver:sqlite", $sid, {Handle=>$dbh});
    12 
    13 =head1 DESCRIPTION
    14 
    15 B<sqlite> driver stores session data in SQLite files using L<DBD::SQLite|DBD::SQLite> DBI driver. More details see L<CGI::Session::Driver::DBI|CGI::Session::Driver::DBI>, its parent class.
    16 
    17 =head1 DRIVER ARGUMENTS
    18 
    19 Supported driver arguments are I<DataSource> and I<Handle>. B<At most> only one of these arguments can be set while creating session object.
    20 
    21 I<DataSource> should be in the form of C<dbi:SQLite:dbname=/path/to/db.sqlt>. If C<dbi:SQLite:> is missing it will be prepended for you. If I<Handle> is present it should be database handle (C<$dbh>) returned by L<DBI::connect()|DBI/connect()>.
    22 
    23 As of version 1.7 of this driver, the third argument is B<NOT> optional. Using a default database in the temporary directory is a security risk since anyone on the machine can create and/or read your session data. If you understand these risks and still want the old behavior, you can set the C<DataSource> option to I<'/tmp/sessions.sqlt'>.
    24 
    25 =head1 BUGS AND LIMITATIONS
    26 
    27 None known.
    28 
    29 =head1 LICENSING
    30 
    31 For support and licensing see L<CGI::Session|CGI::Session>
    32