--- Perrin Harkins <[EMAIL PROTECTED]> wrote:
> James.Q.L wrote:
> > before i had three fields in table sessions : a_session,id,time in the DB.
>
> Did you add code of your own to update the time column?
>
no.
> > 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.
>
> Do you understand what Apache::Session does? It simply use Storable to
> turn the whole hash of values into a single binary chunk and stores it
> all in the a_session field. It uses the id field to find the session
> again. It will not update any other fields unles syou hack the code
> yourself.
I read the doc of Apache::Session::Store::Mysql but there isn't much in it.
and i tried first to have a 'time' field in the sessions table. and it did get
updated. so that's why i thought the record get stored just like that.
and from my phpmysql, you can see the time record.
id a_session time uname test
0543f2dc8dd196c5adeb29f18113f88d 20030901225218 00000000000000
and indeed as you said in record a_session it stores the session data. so if i
understand
correctly, i don't add _new_ column to the sessions table, instead i call
$session{'username'} =
'username' which add it to the column a_session.
> > $session{'time'} = time(); ## this updates 'time' record
>
> But it doesn't update the time column in the database unless you hacked
> the Apache::Session code to do that.
>
now i don't know why the time record gets updated. isn't it suppose to update the one
in
a_session?
one more question if you don't mind.
i know Apache::Session can't do session managerment directly. but i found out that
when a user
session timeout, the record also gone automatically.is tied(%session)->delete; delete
the session?
Thanks
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