[mod_python] The Session problem with mod_python3.2.7

Graham Dumpleton grahamd at dscpl.com.au
Mon Feb 20 22:06:31 EST 2006


Gavin wrote ..
> ...
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp:   File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
> line 188, in load\n    dict = self.do_load()
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp:   File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
> line 321, in do_load\n    dbm = self._get_dbm()
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp:   File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
> line 308, in _get_dbm\n    result = self._dbmtype.open(self._dbmfile, 'c')
> [Tue Feb 21 10:30:18 2006] [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)
> [Tue Feb 21 10:30:18 2006] [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)
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp:   File "/usr/local/lib/python2.4/bsddb/__init__.py", line
> 285, in hashopen\n    e = _openDBEnv()
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp:   File "/usr/local/lib/python2.4/bsddb/__init__.py", line
> 339, in _openDBEnv\n    e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD
> | db.DB_INIT_LOCK | db.DB_INIT_MPOOL)
> [Tue Feb 21 10:30:18 2006] [error] [client 202.104.96.163] PythonHandler
> mod_python.psp: DBError: (138044656, 'Unknown error 138044656')

That the first argument to the open() call is '.' doesn't look correct. This
should from what I can tell be set to the value of self._dbmfile, which is
determined by code:

    def __init__(self, req, dbm=None, sid=0, secret=None, dbmtype=anydbm, timeout=0, lock=1):
        if not dbm:
            opts = req.get_options()
            if opts.has_key("session_dbm"):
                dbm = opts["session_dbm"]
            else:
                dbm = os.path.join(opts.get('session_directory', tempdir), 'mp_sess.dbm')

        self._dbmfile = dbm

Have you used PythonOption to override either "session_dbm" or "session_directory"?

Graham


More information about the Mod_python mailing list