Graham Dumpleton
grahamd at dscpl.com.au
Wed Mar 1 16:44:33 EST 2006
Upgrade to mod_python 3.2.8. The problem should go away for case where publisher is used. See: http://issues.apache.org/jira/browse/MODPYTHON-9 http://www.dscpl.com.au/articles/modpython-003.html Graham d wrote .. > Hello > > I've been having some weird path related problems using mod_python/ > PSP, so I > decided to switch to using absolute paths everywhere, but that > unfortunately didn't > help. Now I have little time to solve this, so I'd really appreciate > a quick answer.. > Here's the problem: > > # I have a /index.py with this contents: > def test (req): > # test.html contains "foo <%= x %> " > tmpl = psp.PSP (req, '/home2/kompassztuki/webapps/mod_python/ > htdocs/test.html') > tmpl.run (vars = { 'x' : 10 }) > > # And a /admin/index.py with: > def test (req): > # test.html contains only "bar <%= x %> " > tmpl = psp.PSP (req, '/home2/kompassztuki/webapps/mod_python/ > htdocs/admin/test.html') > tmpl.run (vars = { 'x' : 11 }) > > To begin cleanly I restart the server and access /test. I get a > page containing > "foo 10", as expected. Now I access /admin/test and the page says > "bar 11", which > is still ok, but then, when I access /test again, I get the same page > containing > "bar 11". > Yes, I did flush the cache and reload the page. Mod_python seems to > launch the > proper function, but in a wrong directory. > Here's the Apache log for this whole event: > > [Wed Mar 01 14:14:18 2006] [notice] caught SIGTERM, shutting down > [Wed Mar 01 14:14:21 2006] [notice] mod_python: Creating 32 session > mutexes based on 256 max processes and 0 max threads. > [Wed Mar 01 14:14:21 2006] [notice] Apache/2.0.46 (Red Hat) > mod_python/3.1.4 Python/2.4 configured -- resuming normal operations > [Wed Mar 01 14:14:33 2006] [notice] mod_python: (Re)importing module > 'mod_python.publisher' > [Wed Mar 01 14:14:33 2006] [notice] mod_python: (Re)importing module > 'test' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs']' > [Wed Mar 01 14:14:33 2006] [notice] mod_python: (Re)importing module > 'index' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs']' > [Wed Mar 01 14:14:34 2006] [notice] mod_python: (Re)importing module > 'favicon.ico' with path set to '['/home2/kompassztuki/webapps/ > mod_python/htdocs']' > [Wed Mar 01 14:14:38 2006] [notice] mod_python: (Re)importing module > 'test' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs/admin']' > [Wed Mar 01 14:14:38 2006] [notice] mod_python: (Re)importing module > 'index' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs/admin']' > [Wed Mar 01 14:14:39 2006] [notice] mod_python: (Re)importing module > 'favicon.ico' with path set to '['/home2/kompassztuki/webapps/ > mod_python/htdocs']' > [Wed Mar 01 14:14:43 2006] [notice] mod_python: (Re)importing module > 'test' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs']' > [Wed Mar 01 14:14:43 2006] [notice] mod_python: (Re)importing module > 'favicon.ico' with path set to '['/home2/kompassztuki/webapps/ > mod_python/htdocs']' > [Wed Mar 01 14:14:45 2006] [notice] mod_python: (Re)importing module > 'test' with path set to '['/home2/kompassztuki/webapps/mod_python/ > htdocs']' > [Wed Mar 01 14:14:45 2006] [notice] mod_python: (Re)importing module > 'favicon.ico' with path set to '['/home2/kompassztuki/webapps/ > mod_python/htdocs']' > > After some time of inactivity, or multiple refreshes, accessing / > test will finally return > a page containing "foo 10", but accessing /admin/test will cause the > same problem > once again. It seems the effect cannot be inversed, i.e. /admin/test > always works fine. > As I said before - a quick reply from anyone would be nice, I'm in > trouble already ;] > > thanks, > d > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|