Tom, All, Sorry If I've introduce mis-understanding. Thus, I confirm that (with the standard session manager) if we close the borwser the session is lost. This is because the cookies generated for the session handeling has an expiration date tagged as "until end of the session". The error comes from me, because I have an application (old one, but still used) dealing correclt with sessions. But by looking at it carefully, we manage the session our self (not via the standard Quixote session module). Maybe a solution... By looking at the session.py code. Why do we have possibilities to introduce new attributes within the _set_cookie method and no possibilities in set_session_cookie ? Would be nice to let developer to introduce/modify some cookie values, no ? " def _set_cookie(self, value, **attrs): config = get_publisher().config name = config.session_cookie_name if config.session_cookie_path: path = config.session_cookie_path else: path = get_request().get_environ('SCRIPT_NAME') if not path.endswith("/"): path += "/" domain = config.session_cookie_domain get_response().set_cookie(name, value, domain=domain, path=path, **attrs) return name def set_session_cookie(self, session_id): """(session_id : string) Ensure that a session cookie with value 'session_id' will be returned to the client via the response object. """ self._set_cookie(session_id) " Tom Lesters wrote: > I'm using session2 with MySQLSessionStore. and test with the altdemo > login, > logout function. > > My problem is that sessionID did not save on a cookie file, > When view cookies in FireFox, only one cookie entry for my server, it > shows: > Expires: at end of session > > While with google, there are several cookie entries and some shows, > Expires: at end of session > but others show different, like, > Expires: Sunday, January 17, 2038 7:00:00 PM > > I tried plain cgi(with apache as http server) and scgi(with lighttpd), > same thing. , after restart browser, it's another session and ask you to > login again. > > I also tried altdemo with durus, > you have to comment out one line in altdemo.py: > # print 'Opening %r as a Durus database.' % filename > > then edit a .cgi file(e.g. altdemo.cgi), put: > *************************************************** > #!/usr/bin/env python > > import sys > import os > > if __name__ == '__main__': > from durussessiondemo import create_durus_publisher > run(create_durus_publisher) > **************************************************** > run it, > same thing, after restart browser, it's another session and ask you to > login > again. > > I'm confuse how William's browser back to the same session(or different > session but still logged as the same user) after restart? > > I guess my question is how to set cookies expiration date to a long time > in > Quixote, > such as: Expires: Sunday, January 17, 2038 7:00:00 PM, > so the session will never expire(or user's login never expire) > Do we need to handle it ourselves or William is right, maybe some > configration in Quixote I don't know? > > Thanks for all the help! > Tom > > > > > > On 2/19/06, william@opensource4you.comwrote: >> >> >> Have you look at Cookbook ? >> >> There is a session manager with DB storge capabilities. >> http://quixote.ca/qx/StoringSessionsInDatabase >> >> mixing that with cookies will solve your problem (I think). >> >> >> >> But I must say that I've never got such problem (lighttpd-1.4.7 + >> quixote-2.1). Browsers will save sessionID in a cookie. Then the browser >> can stop and start (if the server stays up). >> Have you check that your browser will save/manage cookies correctly ? >> >> Problems I've has was concerning multiple threads of the server that are >> not sharing their sessionIDs. >> >> >> >> >> >> Tom Lesters wrote: >> > Hi, >> > >> > Thanks for William for answering my previous question regarding scgi >> and >> > lighttpd. >> > But is it a bug or it suppose to act lik that? >> > >> > Is there a good way to keep user logged in even after restart browser? >> > For example, when we sign in google account(not gmail) with "remember >> me >> > on >> > this computer" checked, >> > even we restart browser, we'll still logged in for google account. >> > >> > I understand that I need to set and get my own cookies. >> > What is a good way to do it in Quixote 2.4? write a subclass of >> Session >> > and >> > SessionMananger with added handling of my own cookie(not session >> coockie)? >> > or modify Publisher class in someway? Or there is already a package >> can >> > help >> > me to accomplish it. >> > >> > thanks a lot, >> > Tom >> > _______________________________________________ >> > Quixote-users mailing list >> > Quixote-users@mems-exchange.org >> > http://mail.mems-exchange.org/mailman/listinfo/quixote-users >> > >> >> >> -- >> William: http://www.opensource4you.com >> >> > -- William: http://www.opensource4you.com