[mod_python] Re: Anyone successfully running mod_python 3.1.3/PSP on FreeBSD?

Reed L. O'Brien reed at intersiege.com
Wed Jun 2 15:31:34 EDT 2004


Petter Holmström wrote:

> Hello,
> 
> Is there anybody out there who's running mod_python 3.1.3/Python Server
> Pages successfully on FreeBSD? If so, how did you install it? What
> version of Python are you using? The reason I ask this is that I can't
> get it to work properly. I've installed both Python 2.3 and mod_python
> 3.1.3 from the Ports collection (on FreeBSD 5.2.1). "Ordinary"
> mod_python scripts work just fine, but everytime I try to use PSP I get
> this error message:
> 
> Mod_python error: "PythonHandler mod_python.psp"
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 287, in HandlerDispatch
>     log=debug)
> 
>   File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 457, in import_module
>     module = imp.load_module(mname, f, p, d)
> 
>   File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py", line 20, in ?
>     import apache, Session, util, _psp
> 
>   File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", line 35, in ?
>     tempdir = tempfile.gettempdir()
> 
>   File "/usr/local/lib/python2.3/tempfile.py", line 242, in gettempdir
>     tempdir = _get_default_tempdir()
> 
>   File "/usr/local/lib/python2.3/tempfile.py", line 188, in _get_default_tempdir
>     raise IOError, (_errno.ENOENT,
> 
> IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
> 
Recompile Python without threads.
cd /usr/local/ports/python
make deinstall
make config
uncheck threads and -->OK
make reinstall

THen you will prolly have  to deinstall reinstall mod_python and 
reuncomment it in httpd.conf.  THen restart apache2. 
mod_python.publisher should work then.

Unfortunatley I need/want to use mpServlets 
(http://home.comcast.net/~d.popowich/mpservlets)
  but it fails on not being able to find module thread...  Any ideas on 
how to chase it down??

I don't know where it stems but trac and plone/zope run fine with 
threads compiled  even with huge stack.  Only fail I have seen is w/ mp. 
  Still a nice mod though.

Reed L. O'Brien
4.6692016090

> Now, I've read somewhere that this might have something to do with
> threads, but I haven't been able to find more information on the
> subject. I'd like to know whether this is an OS, an Apache, a mod_python
> or a python-bug, and how to fix it.
> 
> Thanks in advance,
> 
> -Petter-
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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