[Moin-user] mod_python trouble - url parsing oddness

john crawford jmc-moinlist at sociology.osu.edu
Wed Dec 28 21:02:01 EST 2005


Hi.

  When I run my mod_python 1.3.5 moin wiki
  Apache/2.0.55 (FreeBSD) mod_python/3.1.4 Python/2.4.2
environment, I see slash troubles.
Running cgi mode I don't see the effect.

The link from my frontpage graphic, for example is
http://ss36.sociology.ohio-state.edu/srlwiki//FrontPage
when run under mod_python and
http://ss36.sociology.ohio-state.edu/srlwiki/FrontPage
under cgi.

moinmoin hyper links work when twice clicked displayed as so:
http://ss36.sociology.ohio-state.edu/srlwiki//MeetingMinutes/MeetingMinutes

Looks a bit like script name parsing issue where "pythonoption location"
is helpful on nested/deep wikis, but my alias is only /srlroot

Alias /srlwiki /usr/local/www/srlwiki

<Location "/srlwiki">
       SetHandler python-program
       PythonPath "['/usr/local/www/srlwiki'] + sys.path"
       PythonHandler MoinMoin.request::RequestModPy.run
       PythonAutoReload On
       PythonDebug On
   </Location>



If I put add the line below to the Location bits
       PythonOption Location /usr/local/www/srlwiki


I get

Mod_python error: "PythonHandler MoinMoin.request::RequestModPy.run"

Traceback (most recent call last):

   File 
"/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 
291, in HandlerDispatch
     arg=req, silent=hlist.silent)

   File 
"/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 
526, in resolve_object
     instance = parent(arg)

   File "/usr/local/lib/python2.4/site-packages/MoinMoin/request.py", 
line 1700, in __init__
     self.fixScriptNameAndPathInfo(env)

   File "/usr/local/lib/python2.4/site-packages/MoinMoin/request.py", 
line 1724, in fixScriptNameAndPathInfo
     restoredURI = env['SCRIPT_NAME'] + env['PATH_INFO']

KeyError: 'PATH_INFO'

So that's a bit mysterious to me, but perhaps illuminating to someone else.

Any ideas on how I can get mod_python moin to be kind?

thanks
John





More information about the Moin-user mailing list