Django

Code

Changeset 2311

Show
Ignore:
Timestamp:
02/16/06 10:00:32 (3 years ago)
Author:
adrian
Message:

Beefed up 'If you get a segmentation fault' section in docs/modpython.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/modpython.txt

    r2309 r2311  
    203203=============================== 
    204204 
    205 If Apache causes a segmentation fault, it's probably because you're running 
    206 mod_python and mod_php in the same Apache instance, with MySQL as your database 
    207 backend. This is a known mod_python issue, not a Django issue, and there's more 
    208 information in the `mod_python FAQ entry`. 
    209  
     205If Apache causes a segmentation fault, there are two probable causes, neither 
     206of which has to do with Django itself. 
     207 
     208    1. It may be because your Python code is importing the "pyexpat" module, 
     209       which may conflict with the version embedded in Apache. For full 
     210       information, see `Expat Causing Apache Crash`_. 
     211    2. It may be because you're running mod_python and mod_php in the same 
     212       Apache instance, with MySQL as your database backend. In some cases, 
     213       this causes a known mod_python issue due to version conflicts in PHP and 
     214       the Python MySQL backend. There's full information in the 
     215       `mod_python FAQ entry`_. 
     216 
     217If you continue to have problems setting up mod_python, a good thing to do is 
     218get a barebones mod_python site working, without the Django framework. This is 
     219an easy way to isolate mod_python-specific problems. `Getting mod_python Working`_ 
     220details this procedure. 
     221 
     222The next step should be to edit your test code and add an import of any 
     223Django-specific you're using -- your views, your models, your URLconf, your RSS 
     224configuration, etc. Put these imports in your test handler function and access 
     225your test URL in a browser. If this causes a crash, you've confirmed it's the 
     226importing of Django code that causes the problem. Gradually reduce the set of 
     227imports until it stops crashing, so as to find the specific module that causes 
     228the problem. Drop down further into modules and look into their imports, as 
     229necessary. 
     230 
     231.. _Expat Causing Apache Crash: http://www.dscpl.com.au/articles/modpython-006.html 
    210232.. _mod_python FAQ entry: http://modpython.org/FAQ/faqw.py?req=show&file=faq02.013.htp 
     233.. _Getting mod_python Working: http://www.dscpl.com.au/articles/modpython-001.html