Hi Monks,

I'm using a catalyst model called 'DB' created by DBIx::Class. I want to use session::store::dbi, and am having difficulty with the configuration. Currently I receive an error:

session::Store::DBI: No session configuration found, please configure dbi_dbh

In my catalyst application.conf I have added the following fields:

<Session> expires 1200 dbi_dbh DB dbi_table session dbi_id_field id dbi_data_field session_data dbi_expires_field expires </Session>

and in Model::DB.pm I have the dbh:

__PACKAGE__->config( schema_class => 'Bookie::Schema', connect_info => { dsn => 'dbi:SQLite:sportsbook.db', user => '', password => '', on_connect_do => q{PRAGMA foreign_keys = ON}, } );

The model is working fine when I use session::Store::FastMmap, so I think that as per the error, I am not setting the correct dbi_dsn in the .conf file. I have tried every combination I can think of, using the package names of the result class, the schema, and simply the model name, but I keep receiving the same error.

I've searched this website and online for a solution, but can't find anything. So I would really appreciate some help from you guys!

Many thanks in advance,

Police


In reply to Configuring Catalyst Session data for sessions::store::dbi by PoliceCoP

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.