[Pso-development] RE: pso session handling with the mod_python Publisher?
Status: Beta
Brought to you by:
thanos
|
From: Andy H. <and...@gt...> - 2003-03-24 20:56:37
|
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=20 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 =3D req.pso().session try: session['visits'] +=3D 1 except: session['visits'] =3D 1 return '''<html><body>visits=3D%(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 =20 |