[Moin-user] moin-1.1 on Debian 3.0

Xu Zhang xuzhang at motorola.com
Wed Apr 21 20:25:08 EDT 2004


My system is IBM ThinkPad 570E with Debian 3.0 (2.6.5 kernel). I 
installed moin-1.1 under python-2.1.3 and apache 1.3.26-0woody3. The 
httpd is configured as /etc/apache/conf/httpd.conf:
------
# For my personal Wiki.
Alias /wiki/ "/usr/share/moin/htdocs/"
ScriptAlias /zhx-wiki "/usr/share/moin/zhx-wiki/moin.cgi/"
------
The strange problem is that moin cgi program does not parse "/" as the 
path identifier.
For instance, when I browse my wiki page at 
http://xx.xx.xx/zhx-wiki/UserPreferences, the moin will find the page of 
/UserPreferences but not the UserPreferences. Then, it wrongly posts the 
page of creating /UserPreferences.
I fixed it using the following patch, but why?
------
diff -u -r moin-1.1.orig/MoinMoin/cgimain.py moin-1.1/MoinMoin/cgimain.py
--- moin-1.1.orig/MoinMoin/cgimain.py   Mon Nov 10 05:00:48 2003
+++ moin-1.1/MoinMoin/cgimain.py        Thu Apr 22 09:10:28 2004
@@ -112,7 +112,9 @@

          pagename = None
          if len(path_info) and path_info[0] == '/':
-            pagename = wikiutil.unquoteWikiname(path_info[1:])
+#            pagename = wikiutil.unquoteWikiname(path_info[1:])
+# unknown reason, have to use path_info[2:0] under Debian 3.0  -- zhx
+            pagename = wikiutil.unquoteWikiname(path_info[2:])
      except: # catch and print any exception
          webapi.http_headers(request)
          cgi.print_exception()
------

Thanks,
Xu Zhang





More information about the Moin-user mailing list