I am running into the "exit signal Segmentation fault (11)" problem
while trying to deploy a turbogears app via ActivePython - mod_python
and apache. I know I must be doing something wrong, but I've been to
the wikis and tried a variety of solutions, no seem to have solved the
problem. Any help would be appreciated:
== Environment ==
- Apache/2.0.54
- Linux: Fedora Core 3 - 2.6.5-1.358
- mod_python 3.1.4
- ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on Python
2.4.2 (#1, Oct 2 2005, 17:15:36)
- CherryPy 2.1.0
- Kid 0.8
- SQL Object 0.7
- Turbogears 0.8.8
- mpcp 1.2
- wsgiref 0.0.1 {haven't tested this one yet}
== Things I have tried ==
source: http://www.turbogears.org/docs/deployment/mod_python.html
source: http://trac.turbogears.org/turbogears/wiki/ModPythonIntegration
1. built and installed mod_python (configured setting to my apxs and
python installation)
1a. installed mpcp and copied mpcp.py to my directory
2. Configured my httpd.conf file to load mod_python and to point to my
tubogears directory:
LoadModule python_module /usr/local/apache2/modules/mod_python.so
Alias /buildcentral /home/myuser/myproj1
<Directory "/home/myuser/myproj1">
SetHandler mod_python
PythonPath "sys.path+['/home/myuser/myproj1', '/home/myuser/common']"
PythonHandler mpcp
PythonDebug On
PythonOption cherrysetup myproj1_start::mp_setup
</Directory>
3. Created a small test python script (as the mod_python docs suggest)
and verified that it could be run via mod_python
4. modified /home/myuser/myproj1/myproj1_start.py
#!/usr/bin/env python
import pkg_resources
pkg_resources.require("TurboGears")
import cherrypy
from os.path import *
import sys
def mp_setup():
pass
if exists(join(dirname(__file__), "setup.py")):
cherrypy.config.update(file=join(dirname(__file__), "dev.cfg"))
else:
cherrypy.config.update(file=join(dirname(__file__), "prod.cfg"))
from myproj1.controllers import Root
cherrypy.root = Root()
if __name__ == '__main__':
cherrypy.server.start()
== Attempts ==
Tried this with dev and prod config - Result FAILURE
Tried this from the command line - Result SUCCESS
Added logging to mpcp to capture what is going on - no result
== Next Thoughts ==
I am ready to just give up and run the cherrypy server as python
process. I am also looking into the
http://projects.amor.org/misc/wiki/ModPythonGateway but I'm not sure
what they mean by setting the handler to python-program.
any help would be greatly appreciated. Thanks