{
    "mode": "perldoc",
    "parameter": "CGI::Session::Driver::sqlite",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession%3A%3ADriver%3A%3Asqlite/json",
    "generated": "2026-06-13T07:31:37Z",
    "synopsis": "$s = CGI::Session->new(\"driver:sqlite\", $sid, {DataSource=>'/my/folder/sessions.sqlt'});\n$s = CGI::Session->new(\"driver:sqlite\", $sid, {Handle=>$dbh});\nor\n$s = CGI::Session->new('driver:sqlite', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nHandle=>$dbh,\n});",
    "sections": {
        "NAME": {
            "content": "CGI::Session::Driver::sqlite - CGI::Session driver for SQLite\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "$s = CGI::Session->new(\"driver:sqlite\", $sid, {DataSource=>'/my/folder/sessions.sqlt'});\n$s = CGI::Session->new(\"driver:sqlite\", $sid, {Handle=>$dbh});\n\nor\n\n$s = CGI::Session->new('driver:sqlite', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nHandle=>$dbh,\n});\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "sqlite driver stores session data in SQLite files using DBD::SQLite DBI driver. More details see\nCGI::Session::Driver::DBI, its parent class.\n",
            "subsections": []
        },
        "DRIVER ARGUMENTS": {
            "content": "Supported driver arguments are *DataSource* and *Handle*. At most only one of these arguments\ncan be set while creating session object.\n\n*DataSource* should be in the form of \"dbi:SQLite:dbname=/path/to/db.sqlt\". If \"dbi:SQLite:\" is\nmissing it will be prepended for you. If *Handle* is present it should be database handle ($dbh)\nreturned by DBI::connect().\n\nAs of version 1.7 of this driver, the third argument is NOT optional. Using a default database\nin the temporary directory is a security risk since anyone on the machine can create and/or read\nyour session data. If you understand these risks and still want the old behavior, you can set\nthe \"DataSource\" option to *'/tmp/sessions.sqlt'*.\n",
            "subsections": []
        },
        "BUGS AND LIMITATIONS": {
            "content": "None known.\n",
            "subsections": []
        },
        "LICENSING": {
            "content": "For support and licensing see CGI::Session\n",
            "subsections": []
        }
    },
    "summary": "CGI::Session::Driver::sqlite - CGI::Session driver for SQLite",
    "flags": [],
    "examples": [],
    "see_also": []
}