[mod_python] Apache reload problem

Ole Hansen dsl45393 at vip.cybercity.dk
Sun Sep 30 23:42:00 EST 2001


Hi,

I have just joined this list, so this subject might have been covered before. 
However, the problem is that whenever I change something in my '.py'-file 
apache fails to reload the page. From error_log it seems like apache searches 
for a file with the extension '.p' instead of '.py' - so I modified 
mod_python/apache.py a little.
I replaced (filepath[:-1]) with (filepath[:]) in the following piece of code. 
line 356 and 359 in apache.py


<snip>
            # check also .py and take the newest
            if os.path.exists(filepath[:]) :

                # get the time of the .py file
                mod = os.stat(filepath[:])
                mtime = max(mtime, mod[stat.ST_MTIME])
<snip>

Apache hasn't complained ever since - but this is perhaps not a very good 
solution. Does anybody have another and maby better solution?
I'm using apache 1.3.19, mod_python 2.7.5, and Python 2.1.1.
The file permissions for my '.py'-file is like 'chmod ugo+rwx', so I don't 
think this the problem.

I'm  a newbie to mod_python/Python/Apache so I might have overlooked 
something.

Br,
Ole Hansen




More information about the Mod_python mailing list