i am experiencing a weird problem with the use of apache::session::mysql 

before i had three fields in table sessions : a_session,id,time in the DB. 
and updating table etc from the program was working just fine. however, after i added 
one more
field (username) to the sessions table through phpmysql, updating it in the program
seems has no effect on the username record. no problem on others.

i am sure the username is present in the program. and i can add username record by 
hand through
phpmysql without problem. so i dont think it's lack of database rights. 

i also add a test record which just get timestamp. but it still don't get updated. 
here is code.

sub set_cookie {
    my $self = shift;
    my $sid = shift;
    $sid ||= '';
    my %session;
    &_open_db($self) unless $self->{DBH};

    eval {
            tie %session, "Apache::Session::MySQL", $sid,
                    {Handle => $self->{DBH}, LockHandle => $self->{DBH} };
    };
    croak("creating cookie error: [EMAIL PROTECTED]") if ($@);

    $sid = $session{'_session_id'};
    my $uname = &get_uname($self);
    $session{'test'} = time();    ## this doesn't update 'test'
    $session{'uname'} = $uname if $uname;  ## this doesn't update 'uname'
    $session{'time'} = time();    ## this updates 'time' record
    my $cookie = Apache::Cookie->new(
                    $self->{request},
                    -name => 'ID',
                    -value => $sid,
                    -expires => $self->{CONFIG}->{cookie}->{cookie_expire},
    );
    $cookie->bake;
    return $self->{request};
}

i feel i may have done something stupid but i couldn't find it... 

Regards,

Qiang

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to