Improve Installation / Troubleshooting section in documentation
---------------------------------------------------------------

         Key: MODPYTHON-158
         URL: http://issues.apache.org/jira/browse/MODPYTHON-158
     Project: mod_python
        Type: Improvement

  Components: documentation  
    Versions: 3.3    
 Environment: All
    Reporter: Jim Gallacher
    Priority: Minor


Some of the more commonly asked questions asked on the mailing list relate to 
mod_python configuration issues that are not currently covered in the 
documentation.

Apache can't load mod_python.so
---------------------------------------------

This more common problem on Windows, but can occur on other platforms. A 
typical apache error message looks like this:

Syntax error on line 173 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Cannot load C:/Program Files/Apache
Group/Apache2/modules/mod_python.so into server: The
specified module could not be found.

On Windows this may indicate a problem with missing D
Nicolas offered the following as an explanation on Windows:

"""
One of the possible cause of your problem is that Apache does find
mod_python.so but not one of the DLL it relies on. Unfortunately the error
reporting in this case is quite scarce and misguiding.

The candidates missing DLLs are python24.dll and the Microsoft Runtime DLLS
(normally msvcr71.dll and msvcp71.dll).

Make sure that your Python directory and the runtime DLLs can be found on
your PATH. The runtime DLLs are normaly copied in your Python directory, so
putting the Python directory on your PATH variable should do the trick.

Also, make sure that the user which is running Apache has its PATH variable
properly set. The best way to do this is to define it at the system-wide
level, but logging it under the user and defining the variable at the user
level is also possible.
"""

Apache can't load mod_python.so - undefined symbol
-----------------------------------------------------------------------

This may look similar to the first example, but indicates a deeper problem. 
Typical error message:

httpd: Syntax error on line 231 of /usr/local/apache2/conf/httpd.conf: Cannot 
load /usr/local/apache2/modules/mod_python.so into server: 
/usr/local/apache2/modules/mod_python.so: undefined symbol: 
apr_sockaddr_port_get

This error could indicate an actual bug in mod_python, or a mismatch between 
the Apache version used to compile mod_python versus the one being used to run 
it. I'm not sure there is an easy answer, but we should offer some initial 
troubleshooting suggestions.

make_obcallback: could not import mod_python.apache
--------------------------------------------------------------------------

This one seems to occur on all platforms with similar frequency, and is usually 
related to having python multiple versions on the same system. Typical error 
message:

[Sun Apr 09 14:03:46 2006] [error] make_obcallback: could not import
mod_python.apache.\n
[Sun Apr 09 14:03:46 2006] [error] python_handler: no interpreter
callback found.
[Sun Apr 09 14:03:46 2006] [error] [client 192.168.2.100]
python_handler: Can't get/create interpreter., referer:
http://localhost/mptest.py

The solution is to adjust that PATH apache uses so it finds the correct python 
version. This will be platform specific.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to