I cannot reproduce this and, in fact, if this were broke nothing in web2py would work since everything relies on sessions. There are some possibilities: 1) your browser has cookies disabled (so sessions are re-issued at every request) 2) there is a proxy in between that deletes session cookies 3) there is something in your code that prevents saving of sessions, for example session._forget()
On Saturday, 27 April 2013 11:23:30 UTC-5, Lisandro wrote: > > What I need: to set a flag first time user hits the index in the session. > My code is really simple: > > def index(): > if not session.myvariable: > session.myvariable = True > response.flash = 'I just wrote myvariable' > else: > response.flash = 'myvariable is %s' %session.myvariable > > Expected behaviour: first time the function is accessed the message "i > just wrote myvariable" is shown.. the every time the function is accessed > message "myvariable is True" is shown (until restart of session, for > example restarting the browser). > > When i work on local mode (web2py development server), it works ok. > However in production, it keeps always showing message "I just wrote > myvariable".. It seems as it couldn't write/store session variables. > I'm using last stable version of web2py (2.4.6) in development and in > production. same version. > For production I'm using lighttpd running under www-data user. > In production server "session" folder belongs to www-data and I tried > setting 777 permissions but nothing changed. > > ¿Would you suggest me some test I can do to debug this? Thanks in advance. > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

