Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 12:17:39 +0100
From:      Peter Czanik <pczanik@fang.fa.gau.hu>
To:        freebsd-ports@freebsd.org, perky@freebsd.org, Peter Czanik <pczanik@fang.fa.gau.hu>
Subject:   mod_python3 and apache 2.2
Message-ID:  <441FE0D3.9010008@fang.fa.gau.hu>

next in thread | raw e-mail | index | archive | help
Hello,

I got mod_python3 and apache 2.2 running together. I did some tests, and 
it seems to work fine. The trick is just a one line addition to 
src/include/mod_python.h :

# diff -c src/include/mod_python.h~ src/include/mod_python.h
*** src/include/mod_python.h~   Tue Mar 21 10:30:45 2006
--- src/include/mod_python.h    Tue Mar 21 10:30:45 2006
***************
*** 110,115 ****
--- 110,119 ----
  #define LONG_LONG PY_LONG_LONG
  #endif

+
+ /* fix APR */
+ #define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS )
+
  /* structure to hold interpreter data */
  typedef struct {
      PyInterpreterState *istate;

The idea comes from: 
http://feh.holsman.net/articles/2006/01/03/server-apache-2-2
Could you please include this fix, if apache 2.2 is detected?

Another apache2.2 related problem is in pkg-plist. The path for apache 
2.0 is hard coded there. mod_python installs just fine, but package 
creation and deletion fails with apache 2.2:

# head pkg-plist
libexec/apache2/mod_python.so
@exec %D/sbin/apxs -e -a -n python %f
@unexec %D/sbin/apxs -e -A -n python %f
%%PYTHON_SITELIBDIR%%/mod_python/Cookie.py
%%PYTHON_SITELIBDIR%%/mod_python/Cookie.pyc
%%PYTHON_SITELIBDIR%%/mod_python/Cookie.pyo
%%PYTHON_SITELIBDIR%%/mod_python/Session.py
%%PYTHON_SITELIBDIR%%/mod_python/Session.pyc
%%PYTHON_SITELIBDIR%%/mod_python/Session.pyo
%%PYTHON_SITELIBDIR%%/mod_python/__init__.py

Thanks for your help,

-- 
CzP
http://peter.czanik.hu/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?441FE0D3.9010008>