[Cgi-session-user] session data not being saved till flushed.
Brought to you by:
sherzodr
From: James.Q.L <shi...@ya...> - 2006-02-12 04:31:01
|
HI, I am using C::S 4.03 and the session data is not saved unless i call flush(). The doc claims otherwise, "Normally it will be called for you just before the program terminates, or session object goes out of scope, so you should never have to flush() on your own." Originally, I was using it with CGI::Application::Plugin::Session and noticed this behaviour. then I run this little test: % perl -MCGI::Session -e '$s=CGI::Session->new;$s->param("log",1)' % cat /tmp/cgisess_2c7678a377472c64a250304007295874 $D = {_SESSION_ID => '2c7678a377472c64a250304007295874',_SESSION_ATIME => 1139717550,log => 1,_SESSION_REMOTE_ADDR => '',_SESSION_CTIME => 1139717550}; % perl -MCGI::Session -e '$s=CGI::Session->new;$s->param("log",1);$s->flush()' % cat /tmp/cgisess_1d74dd15ded333689551116eae1ec263 $D = {_SESSION_ID => '1d74dd15ded333689551116eae1ec263',_SESSION_ATIME => 1139717605,log => 1,_SESSION_REMOTE_ADDR => '',_SESSION_CTIME => 1139717605}; looks like flush() call is necessary. James. __________________________________________________________ Find your next car at http://autos.yahoo.ca |