Ok. I want to use apache Apache::Session::MySQL. Awesome. Looks really pretty. Sexy stuff.

I'm looking over it at cpan, and it's a little comfusing.

I should obviously create a database for it- right?

I should also make a table for it?

Do I have to predetermine what the data will be, that is- a table layout? in which case this is useless..

Thanks in advance for any help.

update: ( thanks mbeast ) ok, got further. still no cigar.
I get this:

Can't connect to data source , no database driver specified and DBI_DS +N env var not set at /usr/lib/perl5/site_perl/5.8.3/Apache/Session/Lo +ck/MySQL.pm line 36 (in cleanup) Can't connect to data source , no database driver + specified and DBI_DSN env var not set at /usr/lib/perl5/site_perl/5. +8.3/Apache/Session/Lock/MySQL.pm line 36

I *know* my connect info is correct. I have a proper table in the db too..

I'm using a db handle

&openDBH; # subroutine that # places open handle globally accessible at $DBH my %session; tie %session, 'Apache::Session::MySQL', undef, { Handle => $DBH, TableName => 'sessions2' };

I'm giving up on this one soon..


In reply to setting up to use Apache::Session::MySQL by leocharre

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.