On 2004-09-29, Sean Davis <[EMAIL PROTECTED]> wrote:
>
>    $self->param('dbh' => DBI->connect($dsnnlt,
>                                    $nltuser,
>                                    $nltpass
>                                   ))
>      or croak "Database connection not made: $DBI::errstr";

Hmm... looks like a good use for ::Plugin::DBH  :)

>    my $sid = $self->query->cookie("CGISESSID") || undef;
>    $self->session_config(
>      CGI_SESSION_OPTIONS => ['driver:MySQL',$sid,
>                           {Handle=>$self->param('dbh')}],

I think this is what is happening: You are trying to initialize
the session with a value from a cookie which doesn't exist, so it's
creating a new session instead. The standard idiom is to initialize
from the CGI object. This will check both the cookie and the CGI params
for a value, and then create a new session if niether is found. So:

 s/$sid,/$self->query,/

See CGI::Session::Tutorial for more detail. 

        Mark    

-- 
http://mark.stosberg.com/ 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to