From: Gerald W. L. <Ger...@co...> - 2006-04-02 21:43:18
|
Raul Elizondo (wizardteam) wrote: > There are 2 ways to store sessions, one is using arrays (wich will eat > some memory if you dont clean those variables periodically, ie > var1(session), var2(session), var3(session)), or the common way which > uses temprally files in /tmp. However, keeping global variables cant > be mixed as tclhttpd does one at the time request (with no threads > enabled), unless you dont reset your variables. For that case, ncgi > package is very handy instead of using global variables. > > The best and clean way to do session its as explained by Sean Woods in > the last message. Using one cookie generated with a random string (as > the ticket number or traking string) that matches against a sql record > in which you can store must of the private environment for the session > (usually the username). Another way to store per session information is to cut a safe interpreter per session. In any case, including using files or SQL records you need to delete old session information. Use the Session_Reap command to assist in this -- in fact you the session commands in general. > > Regards, > > -=Raul=- > > -----Original Message----- > *From:* tcl...@li... > [mailto:tcl...@li...]*On Behalf Of > *salah jubeh > *Sent:* Friday, March 31, 2006 11:56 PM > *To:* Jeff Smith; tcl...@li... > *Subject:* Re: [Tclhttpd-users] sessions > > Hi Jeff, > > The problem with session package, i think it is not complete, > after creating a session, the user suppose to have his own > state i.e variables, it is not just only tracking the user "how > is the user" because this can be done by hidden fields, after > creating session still all the forms variable are in the global > scope that's mean that if two users are inserting records at the > same time, the records will mix up > > */Jeff Smith <hea...@ya...>/* wrote: > > Hi Salah, > > > second in the session library how it is work to > > maintain variable states and can you give me > > example. > > > > There are a few examples of using TclHttpd's session > module on the wiki > > http://wiki.tcl.tk/2927 > > Kind Regards > > Jeff Smith > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------------------------ > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. > Great rates starting at 1¢/min. > <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com> > -- +--------------------------------+---------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervantes| +------------------------------------------------------------------------+ |