Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski <pilkowsk@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 13:03:07 +0200
Subject: CGI::Session with MySQL Driver
* Alexandre Jaquet schrieb:
> Does anyone 've a sample test script I can use.
>
> I've search the web but didn't find something relevant.
Take the one I recently fixed for you in your last thread (look at
<news:3fvvicF9s5ovU1@xxxxxxxxxxxxxx> if you don't remember) as basis.
Change the call of CGI::Session's constructor from
my $session = new CGI::Session( "driver:File", undef,
{Directory => 'C:/sessions'} );
to
my $dbh = DBI->connect( ... ) # create databasehandle
my $session = new CGI::Session( "driver:MySQL", undef,
{ Handle => $dbh} );
Pay attention to the second parameter which should be remain as it
already is in the various situations. Then read the docs to learn how
creating the necessary table in your MySQL database, at
http://search.cpan.org/~sherzodr/CGI-Session-3.95/Session/MySQL.pm
That's all. If you have a specific problem, try to check the docs first
-- perhaps there is already mentioned a solution.
regards,
fabian
.
- Follow-Ups:
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- References:
- CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- CGI::Session with MySQL Driver
- Prev by Date: Re: a simple question
- Next by Date: Re: CGI::Session with MySQL Driver
- Previous by thread: Re: CGI::Session with MySQL Driver
- Next by thread: Re: CGI::Session with MySQL Driver
- Index(es):