[mod_python] mod_python3.2.2b problem with session

Gavin gavin at sz.net.cn
Wed Nov 30 03:31:04 EST 2005


Hello all,

I am using mod_python3.2.2b(python2.4.1,apache2.0.55), I write a test program as 
following to test Session,but Failed. I have attached the Error message as following. 
This code works correctly in mod_python3.1.14(python2.3.5),I don't kown its why?

<%
from mod_python import apache,Session

sid='1223'
secret="Abstfgsd"
S=Session.Session(req,sid,secret,1800)
sid=S.id()
if S.is_new():
    #S.save()
    req.write(sid)
else:
   S.load()
   req.write(sid)
%>

<%
%>

The Error message in apache is as following:

[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp: Traceback (most recent call last):
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/psp.py", line 302, in handler\n    p.run()
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/psp.py", line 213, in run\n    exec code in global_scope
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/data/HTTPD/htdocs/FeedBack/sid.m"
, line 9, in ?\n    S.save()
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/Session.py", line 209, in save\n    self.do_save(dict)
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/Session.py", line 335, in do_save\n    dbm = self._get_dbm()
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/site-pack
ages/mod_python/Session.py", line 310, in _get_dbm\n    result = self._dbmtype.open(self._dbmfile, 'c')
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/anydbm.py
", line 83, in open\n    return mod.open(file, flag, mode)
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/dbhash.py
", line 16, in open\n    return bsddb.hashopen(file, flag, mode)
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/bsddb/__i
nit__.py", line 285, in hashopen\n    e = _openDBEnv()
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp:   File "/usr/local/lib/python2.4/bsddb/__i
nit__.py", line 339, in _openDBEnv\n    e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOO
L)
[Wed Nov 30 16:18:19 2005] [error] [client 202.104.96.163] PythonHandler mod_python.psp: DBError: (159940408, 'Unknown error 159940
408')







More information about the Mod_python mailing list