[mod_python] 3.2.5b - Questions

Peter Sanchez pjs at packet-addiction.org
Mon Jan 23 15:19:00 EST 2006


First, I upgraded from 3.2.2b to 3.2.5b last night, and immediately  
started getting the following:

[Sun Jan 22 21:33:53 2006] [error] make_obcallback: could not import  
mod_python.apache.\n
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/mod_python/ 
apache.py", line 765, in ?
     exists_config_define = _apache.exists_config_define
AttributeError: 'module' object has no attribute 'exists_config_define'

So I edited apache.py and commented out that line, as I didn't see it  
referenced anywhere else in the source. Seems to be fine so far, I  
hope I am not gonna be needing that :) Any ideas on this one?

Second, I switched our website, finally, to the new back end using  
mod_python late last night. One thing I hadn't thought of though, was  
all the subdirectories using mod_python as the default handler as  
well (for images, etc.) So I ended up having to do the following to  
my config (in a panic heh)


     <Directory /home/ahcabron/public_html>
         Options FollowSymLinks
         AllowOverride All
         Options -MultiViews
         SetHandler python-program
         PythonHandler mod_python.publisher
         PythonAutoReload Off
         #PythonDebug On
     </Directory>

     <Location /main>
         SetHandler default-handler
     </Location>

     <Location /albums>
         SetHandler default-handler
     </Location>

     <Location /stats>
         SetHandler default-handler
     </Location>


Is there a better way to do this other than a bunch of <Location>  
directives?

Thanks!

Peter


More information about the Mod_python mailing list