Gavin
gavin at sz.net.cn
Tue Feb 21 05:25:48 EST 2006
Thanks Graham. > Please keep posts on the mailing list. > > On 21/02/2006, at 5:41 PM, Gavin wrote: > >> hello Graham >> >> Thank you! >> My configuration is as following: >> >> <Directory "/data/HTTPD/htdocs/FeedBack"> >> >> AddHandler mod_python .m > > Do you really mean ".m"? Don't you mean ".psp, how else can you use > "sid.psp" > as file name? > Right. I use sid.m. >> PythonHandler mod_python.psp >> #PythonHandler mod_python.publisher >> PythonPath "['/data/HTTPD/py_api']+['/data/HTTPD/htdocs/FeedBack'] >> +sys.path" >> PythonDebug Off >> Options Indexes FollowSymLinks >> Order deny,allow >> Allow from all >> >> </Directory> >> >> I don't use PythonOption to override the either "session_dbm" or >> "session_directory" > > All I can suggest then is to look for the file: > > /tmp/mp_sess.dbm.db > > or something named similarly. I don't think it is meant to have extra > ".db" extension > but on my Mac there is one for some reason. > Cann't found any file like mp* under /tmp > This is the DBM session database. It may have somehow got corrupted. > If you don't > have a main Apache process that is still trying to use it, remove it > and start over. > > You could also put in your Apache configuration: > > PythonOption session_dbm /tmp/mp_sess_test.dbm > add the above PythonOption in httpd.conf directive. and restart httpd server. The same error happan as I report ago when access sid.m [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: Traceback (most recent call last): [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req) [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/psp.py", line 302, in handler\n p.run() [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/psp.py", line 213, in run\n exec code in global_scope [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/data/HTTPD/htdocs/intapp/sid.m", l ine 6, in ?\n S=Session.Session(req) [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 698, in Session\n timeout=timeout, lock=lock) [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 300, in __init__\n timeout=timeout, lock=lock) [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 129, in __init__\n if self.load(): [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 188, in load\n dict = self.do_load() [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 321, in do_load\n dbm = self._get_dbm() [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/site-packa ges/mod_python/Session.py", line 308, in _get_dbm\n result = self._dbmtype.open(self._dbmfile, 'c') [Tue Feb 21 18:30:04 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 18:30:04 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 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/bsddb/__in it__.py", line 285, in hashopen\n e = _openDBEnv() [Tue Feb 21 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: File "/usr/local/lib/python2.4/bsddb/__in it__.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 18:30:04 2006] [error] [client 202.104.96.163] PythonHandler mod_python.psp: DBError: (139531504, 'Unknown error 1395315 04') > Then return your test. Because it will be a fresh database, if it > works, may again > show that default database is corrupt. > > Graham > > >> Sincerely, >> >> Frank Ning >> >> >> >> ----- Original Message ----- >> From: "Graham Dumpleton" <grahamd at dscpl.com.au> >> To: "Gavin" <gavin at sz.net.cn> >> Cc: "mod_python" <mod_python at modpython.org> >> Sent: Tuesday, February 21, 2006 11:06 AM >> Subject: Re: [mod_python] The Session problem with mod_python3.2.7 >> >> >> 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 > >
|