From: Raul E. (wizardteam) <ra...@wi...> - 2006-04-02 09:55:54
|
There are 2 ways to store sessions, one is using arrays (wich will eat so= me memory if you dont clean those variables periodically, ie var1(session), var2(session), var3(session)), or the common way which uses temprally fil= es in /tmp. However, keeping global variables cant be mixed as tclhttpd doe= s 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 usi= ng global variables. The best and clean way to do session its as explained by Sean Woods in th= e last message. Using one cookie generated with a random string (as the ticket number or traking string) that matches against a sql record in whi= ch you can store must of the private environment for the session (usually th= e username). Regards, -=3DRaul=3D- -----Original Message----- From: tcl...@li... [mailto:tcl...@li...]On Behalf Of salah jub= eh 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 variab= le are in the global scope that's mean that if two users are inserting recor= ds 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 ra= tes starting at 1=A2/min. -- Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006 |