[mod_python] Apache reload problem

Ole Hansen dsl45393 at vip.cybercity.dk
Wed Oct 3 21:54:16 EST 2001


I have heard of others beside me having the same problem (all using Debian), 
so I thought this problem was very common. At least I believed that an 
'official' patch was available.

I will live with my own patch - which I don't consider permanent - until 
things solve themselves with a new release or combination of 
Apache/Python/mod_python.

If anybody finds a better patch or solution I'll be happy hearing about it.
Thanks in advance.

/Ole Hansen


On Tuesday 02 October 2001 23:40, you wrote:
> On Tue, Oct 02, 2001 at 09:19:46PM +0200, Ole Hansen wrote:
> > Hi again,
> >
> > Am I the only one having this kind of problem?
>
> Actually, no!
>
> Had the same problem a few weeks, with a new python, apache and mod_python.
> Making a script.pyc solved it, haven`t look into it yet.
>
>
>
> Harmen
>
> > Br,
> > Ole Hansen
> >
> > On Sunday 30 September 2001 23:42, you wrote:
> > > 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.



More information about the Mod_python mailing list