[mod_python] Session Freezing using mod_python.Session

Kenneth Loafman kenneth at loafman.com
Wed Mar 14 17:10:22 EST 2007


Hi,

The small snippet of code below freezes if there is an existing pysid 
cookie (sample straight out of the manual).  If there is no pysid 
cookie, then index() displays, but show() hangs.

Platform is Ubuntu Edgy 64-bit, Apache, mod_python, python 2.4.

Any suggestions would be appreciated.

...Thanks,
...Ken

def index(req):
    session = Session.Session(req)
    if session.is_new():
       session['hits'] = 1
    else:
       session['hits'] += 1
    session.save()
    return """\
%s
<fieldset>
<legend>
Please select the database:
</legend>
<form method="post" action="/demo/index/show">
<...snip...>
%s
""" % (_head, _tail)

def show(req):
    session = Session.Session(req)
    <...snip...>


More information about the Mod_python mailing list