[mod_python] Win2k httpd.conf problems

douglas savitsky dsavitsk at midway.uchicago.edu
Fri May 4 00:35:02 EST 2001

hi there,

i am having trouble getting started, and could use some help.
Win2k, Apache 1.3.14, mod_python 2.7.2, ActivePython 2.0.

I am unable to configure things, and i get the error:
Mod_python error: "PythonHandler test"

Traceback (most recent call last):

  File "c:\program files\python20\lib\mod_python\apache.py", line 180, in 
    object = resolve_object(self.req, module, object_str, silent)

  File "c:\program files\python20\lib\mod_python\apache.py", line 396, in 
    raise AttributeError, s

AttributeError: module 'c:\program files\python20\lib\test\__init__.pyc' 
contains no 'handler'

I saw a reference to this here
but i don't know what the answer means ...

as far as set up, here is what i have done ...

1. put the .dll where it goes.  that part seems okay.
2. add the line 'LoadModule python_module modules/mod_python.dll' which also 
seems fine
3. copy all of the .py files from 
..\python20\lib\mod_python-2.7.2\lib\python\mod_python\*.py to 
[if i put them elsewhere i get other erros]
4. make changes to the httpd.conf file so it looks like this
<IfModule mod_alias.c>
    Alias /icons/ "C:/Apache/icons/"
    <Directory "C:/Apache/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
    <Directory "C:/Apache/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    <Directory "C:/Apache/cgi-bin">
        AddHandler python-program .py
        PythonHandler test
        PythonDebug on

thanks for any help.  i am coming over from iis/asp world, so i have no apache 
experience either.


More information about the Mod_python mailing list