[Pso-development] Re: pso session handling with the mod_python Publisher?
Status: Beta
Brought to you by:
thanos
|
From: <th...@0x...> - 2003-03-25 15:13:08
|
Andy Henshaw writes: You sould not be having this problem. Check which cookies are being sent or set. Its best to use a mozilla browser, which lets you see the cookie values being sent. The whole idea of the the session object is not to have this problem. Remember the session object is rebuilt from a temporary file, whose name is the value of the cookie set. The name of the cookie is some default value for you. I would be interested to see what cookies are being set. Also I am running Apache 1.3 - so I will intsall 2.0 and mod_python 3.0.3 and try things out. Many Thanks And thanks for the release error. > Okay, Ive figured out that it is related to having multiple http processes -- aparently I am getting multiple counters - one for each http process. How is this normally handled? > > > -----Original Message----- > From: Andy Henshaw > Sent: Monday, March 24, 2003 3:52 PM > To: 'pso...@li...' > Subject: pso session handling with the mod_python Publisher? > > > I've attempted to implement session handling as described in the easy mod_python session handling - but I'm using the Publisher interface. It sort of works, but it has a glitch. > > My httpd.conf file has the following entry > > <Directory /usr/local/apache2/htdocs/test> > AddHandler python-program .py > PythonHandler mod_python.publisher > PythonFixupHandler pso.modpython::fixup > PythonLogHandler pso.modpython::cleanup > PythonDebug On > </Directory> > > My mptest.py file looks like this: > > def index(req): > session = req.pso().session > try: > session['visits'] += 1 > except: > session['visits'] = 1 > return '''<html><body>visits=%(visits)s</body></html>''' % session > > > The example displays okay, but it looks like I have 3 or 4 different counters running simultaneously, with a random choice of which one to display. > > For example, (each line is a browser page refresh) > visits: 1 > . > . several samples snipped > . > visits: 8 > visits: 9 > visits: 12 > visits: 13 > visits: 9 > visits: 11 > visits: 10 > visits: 13 > visits: 9 > visits: 14 > > This is a linux box, running Apache 2.0.x, mod_python3.0.3, and pso-0.98.C-beta. By the way, I had to grab the url.py file from the Win32 archive - it doesn't seem to be in the tar.gz version. > > Any ideas? > > > > > > Andrew M. Henshaw > Sr. Research Engineer > GTRI/ELSYS > > 404.894.8239 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > pso-development mailing list > pso...@li... > https://lists.sourceforge.net/lists/listinfo/pso-development thanos vassilakis 127 greene street New York NY 10012-5401 w. 212 383 2777 |