[mod_python] The Session problem with mod_python3.2.7

Gavin gavin at sz.net.cn
Wed Feb 22 03:36:16 EST 2006


Hi Nicolas,

>Hi Gavin,

>Have you tried fixing your compilation configuration as Jim suggested
>? The fact that Python 2.4 is your default Python means nothing for
>the user Apache is running under.

>Would it be possible that your Apache server also loads another
>version of the BSDDB, which would explain the failure in the server
>context but not at the command line ? I'm thinking about something
>like Subversion and its mod_dav_svn which uses BSDDB 4.3.

I installed BerkeleyDB.4.3 and BerkeleyDB.4.2 ago,  Now I remove 
BerkeleyDB.4.2, and recompile Python2.4.2, apache2.0.55, 
mod_python3.2.7 again.  Everything works correctly. So I think
The problem may be  resulted by BerkeleyDB.4.2.

Thanks Nicolas and Graham.

Sincerely,

Frank Ning

>[Tue Feb 21 19:23:14 2006] [error] [client 202.104.96.163]
>PythonHandler mod_python.psp:   File
>"/usr/local/lib/python2.4/site-packages/mod_python/Session.py", line
>309, in _get_dbm\n    result = self._dbmtype.open(self._dbmfile, 'c')


2006/2/22, Gavin <gavin at sz.net.cn>:
> > Gavin wrote:
> >> Hello all,
> >>
> >> 1.Redhat AS3.0
> >> 2.apache 2.0.55
> >> 3.python2.4.2
> >> 4.mod_python3.2.7
> >>ui
> >> compile with:
> >> ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python-src=/usr/tools/Python-2.4.2 --with-max-locks=32
> >
> > I'm not sure if this specifically relates to your problem, but there may
> > be a problem with the way you've compiled mod_python.
> >
> > Your other emails indicate you have python 2.3.5 installed as well as
> > well as python 2.4. You need to use --with-python, not --with-python-src
> > in your configure. The --with-python-src switch is only required for
> > building the documentation and does not tell configure which python
> > binary to use. Make sure you are using the correct by version by
> > configuring and compiling again:
> >
> > ./configure --with-apxs=/usr/local/apache2/bin/apxs
> > --with-python=/path/to/python2.4-binary --with-max-locks=32
> >
> > Without the --with-python option, configure will try to find python on
> > your path. On AS3.0 this may be python 3.2.5, unless you've changed your
> > default OS configuration.
> >
> > When you tried Graham's interpreter test, are you sure you were using
> > python2.4 and not python2.3? Perhaps you could try again and cut and
> > paste the output? eg.
> >
> [root at svrb tmp]# /usr/bin/python
> Python 2.4.2 (#1, Nov 24 2005, 16:48:31)
> [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
> [root at svrb tmp]# python
> Python 2.4.2 (#1, Nov 24 2005, 16:48:31)
> [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import anydbm
> >>> db = anydbm.open('/tmp/mp_sess_test.dbm','c')
> >>> db.close()
>
>
> > jim at carbon:/tmp$ python
> > Python 2.3.5 (#2, Nov 20 2005, 16:40:39)
> > [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import anydbm
> >>>> db = anydbm.open('/tmp/mp_sess_test.dbm','c')
> >>>>
> >
> > Jim
> >
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>



More information about the Mod_python mailing list