Questions & Answers

/!\ Please first read the stuff below, then ask your question about MoinMoin on the appropriate subpage (this page is just a merging page and not editable).

(!) And also please answer other people's questions, if you know the solution. :-)

Editable subpages are:

All subpages are included/merged below

Joy of errors

Edit this section

Contents

  1. Navigation problem in Internet Explorer
  2. Cannot create new pages
  3. Get 404 Error When Clicking On A Missing Link
  4. Are there reserved words
  5. Pages load text but no formatting
  6. Premature end of script headers
  7. Some of the tests fail
  8. Error when saving page "Page could not get locked. Missing 'current' file?"
  9. Error when canceling edit "Page could not get locked. Missing 'current' file?"
  10. wiki Self confused between different wiki instances
  11. Could not find a match for url
  12. Verification failed for Unrouteable address Sender verify failed
  13. Newsfeed under the weather
  14. WikiWord would not appear with Spaces as Wanted in the UserPreferences
  15. ImportError: No module named wikiconfig
  16. reference to mywiki for HelpOnEditing / SyntaxReference
  17. Missing SyncPages Action on Desktop Edition
  18. Getting [Error 17] Cannot Create a file when that file already exists
  19. data_underlay_dir "/srv/www/vhosts/name/cgi-bin/daten/moin/intern/data/underlay/" does not exists, or has incorrect ownership or permissions.
  20. Error While Saving Page
  21. 'module' object has no attribute 'getmro'
  22. Moving my Wiki from one PC to another
  23. Internal Server Error - Problem with request.py
  24. Cannot allocate memory ?
  25. Very narrow editor text area
  26. EMail again
  27. Wiki runs fine just won't save pages!
  28. Install error
  29. New Wiki Installation: Can see FrontPage, but can't edit??
  30. bad links on edit page
  31. Trouble running with mod_python
  32. UTF-8 does not work in titles of items
  33. UnicodeDecodeError on moin startup
  34. Embedding of object by chosen formatter not possible
  35. Looking for attachment in wrong directory
  36. After upgrade, instead of starting page only a traceback
  37. After upgrade, TableOfContents macro not working with maxdepth
  38. Can't create users after upgrade 1.6->1.7, UserPreferences does not exist (Debian)
  39. Getting Traceback about Unicode
  40. Some users try to save an edit, but delete the page!?
  41. Cannot see Python traceback

Navigation problem in Internet Explorer

Hi, we're experiencing this odd navigation event saving changes in text edit mode:

    * Internet Explorer cannot display the webpage Most likely causes:
          o You are not connected to the Internet.
          o The website is encountering problems.
          o There might be a typing error in the address.
      More information: This problem can be caused by a variety of issues, including:
          o Internet connectivity has been lost.
          o The website is temporarily unavailable.
          o The Domain Name Server (DNS) is not reachable.
          o The Domain Name Server (DNS) does not have a listing for the website's domain.
          o If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.

But it did save the text.

We get this more often than not, when saving changes, both from text and gui edit modes. Also we get it when previewing changes, and when that happens, the changes get lost.

We've tested this with both IE and Firefox, and it is definitely IE specific, or at least, we don't get it, ever, with Firefox.. Our connection settings are exactly the same in both.

We are using python 2.6.1 from python.org, and the PKG-INFO file says MoinMoin 1.8.1. Using IE v7.0.5730.13.

You might consider adding a Help page called HelpOnVersion.

Do you have a version that addresses this problem? We don't have the option of not supporting IE.

Thanks,

Darrell.

(!) Well, one possible cause is missing from the list given by IE:

  • Internet Explorer is crap and behaving silly. ;)

Sorry if that sounds funny / not constructive to you, but after having seen lots of IE bugs / non-standard behaviours and waisted many hours trying to work around such crap, maybe it just boils down to that.

What would be helpful is if someone would find out what is triggering this strange IE behaviour and whether there is a workaround. I guess we would then implement that workaround (if it does not harm stuff for standards compliant browsers). Please do not expect that this workaround will be found by moin developers, because (AFAIK) noone of them is using IE and most are quite tired of wasting many hours of their free time just to make that piece of crap of a browser behave.

Another option is to report this problem to Microsoft's IE team. Maybe they can fix it. As other browsers do not show this strange behaviour, it is likely a bug in THEIR software.

-- ThomasWaldmann 2009-02-12 08:12:11

Cannot create new pages

I have moved my MoinWiki Persona Ed. from 1.5.something to 1.6.0 without problems. But now I cannot add new pages. I create the link, but when clicking on it it display the usual page with: This page does not exist yet. You can create a new empty page, or use one of the page templates.

Action(edit,Create new empty page)

etc.

Now clicking on Action do absolutely nothing except changing to the http://localhost:8080/Action%28edit%2CCreate%20new%20empty%20page%29 Page.

Any idea? Thanks! mario

Is that on Mac OS X? There is a known bug in 1.6.0 for Mac users, it is fixed already in the 1.6 repo (see http://hg.moinmo.in/moin/1.6/ ) and will be in 1.6.1.

mario-> no I'm on WinXP

Do you have replaced the underlay dir of your wiki instance with the shipped one? If so please check if you have a changed MissingPage page in your wiki.

mario-> Solved! I installed 1.6.1 then copied the content of /wiki/pages (except BadContent, already present) from my 1.6.0 installation to 1.6.1 and now everything works as expected. Thanks for your help!

mijo: I had the same problem. I think, I mixed up the underlay-directory. I solved the problem by removing the underlay-dir and reinstalling it with a new one (of the same version!)

IIS will return a 404 error when you click a link to a new WikiWord (ie. a missing link), if the wiki instance virtual directory is not correctly configured. This is caused by IIS returning a custom error message with the 404, rather than the industry standard default of "Not Found". It looks like Moin is reading the contents of the page returned rather than the status code, not sure if that is the correct way to implement the redirect. In any case, the fix is to change the custom error for the wiki virtual directory.

  • Right click the wiki instance virtual directory and select Properties

  • Click the Custom Errors tab

  • Scroll down to 404 (don't worry about 404;2 or 404;3) and click Edit...

  • Change the Message Type to Default

  • Click Ok

-- ChristopherBrandt 2009-04-09 20:06:00

You may want to read HowTo/MoinOnIIS and modify it if it is not correct. -- ReimarBauer 2009-04-09 20:38:33

Are there reserved words

I am unable to write the word "Python" without the quotes on some of my pages, when I go to save I get a 403 Forbidden.

"You don't have permission to access /cgi-bin/moin.cgi/blahBlah on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

When I remove "Python" from the page, it saves. Are there reserved words or phrases?

(!) Well, you can put anything you like onto LocalBadContent page (which is intended for spam protection, not Python protection :) ). In case you are running IIS you need to fix its broken http error handling, see the IIS infos in the docs.

Pages load text but no formatting

I am trying to install Moin on IIS and I am stumped. I get no error messages when loading the page but only the ext shows up, no images and no formating. Since it is a new install I have deleted and reinstalled to see if I somehow missed a step in the configuration but each time it is the same. Any ideas of why fomating and images wouldn't show up?

Premature end of script headers

I'm trying to get moin running under MyFavorite OS. The Installation documentation seem strange and somewhat false. Yet I've followed the instructions by the book, I get this error with no traceback whatsoever:  Premature end of script headers: moin.cgi  or  The specified CGI application misbehaved by not returning a complete set of HTTP headers.  Running moin.cgi from the command line works fine and returns lots of nice HTML code.

Solution

This is a common error message which can have a lot of reasons:

  • Wrong owner of the wiki directory
  • Wrong permissions
  • Wrong #!/path/to/python
  • ScriptAlias is broken

Try to look into the server error log to get more information.

On an IIS webserver, this error can occur when the IIS engine somehow loses the ability to spawn Python CGI processes correctly. If your configuration is correct and this error mysteriously occurs, try a reboot of the entire system (a simple iisreset does not seem to be enough to solve this problem).

See more troubleshooting tips on the MoinMoinQuestions/Installing page.

Some of the tests fail

When running action=test, I get few errors:

parser.wiki: DateTime macro ... FAIL
wikidict: names in SystemPagesGroup should be in request.dicts ... FAIL

Solution

Delete data/cache/wikidicts/* to fix the wikidicts test. The first test might fail on certain system and is a problem with your system libraries, not with moin. There is a note about it and a link to the bug page in the test error report.

Error when saving page "Page could not get locked. Missing 'current' file?"

I get the error when editing and saving the page FrontPage. I've tried altering the file permissions but with no luck. Since I can't save the first page I've no idea if this affects other pages. -- ThiloPfennig 2006-01-23 07:57:31

Solution

Go to data/pages/FrontPage/ and rename the current-locked file to current.

  • Also try: Go to data/pages/BadContent/ and rename the current-locked file to current. (I think it might alter BadContent on each edit attempt)

  • For more details to debug this, edit PageEditor.py and in the _write_file() function inside the loop where it tries to write the file, have the failure be reported into a log file of your choosing with something like this:

    except OSError, err:
                    write_to_my_logfile( 'exception: got an OSError: '+ str(err) )
  • Another solution: With my DesktopEdition it happened that I lost the current file in pages/ U  s e r N a m e/MoinEditorBackup. As a result I could not edit any file and got the same error. Rebuilding the current file helped. (I assume I lost the file when saving multiple pages in rapid succession from different browser tabs).

  • The above is also true on systems where the slash is encoded (such as "(2f)" for example). So it would be: pages/ U s e r N a m e(2f)MoinEditorBackup instead. In other words, you should make sure that a current file exists in this path. You could copy an existing current file from elsewhere (usually with a content of "00000001"). Why on earth this file had disappeared in the first place is still a mystery.

  • Another possible cause: no free disk space

Error when canceling edit "Page could not get locked. Missing 'current' file?"

We saw this error for one specific user. When she tried to cancel an edit, she would get this error.

Solution

MoinMoin tries to write UserName/MoinEditorBackup on cancel, so you can recover the edit in case you didn't really want to cancel. These pages exist even if there are no links to them in the Wiki (as was the case for us). Somehow, this page was corrupted and was missing it's "current" file. Deleting the UserName/MoinEditorBackup page was the solution.

wiki Self confused between different wiki instances

I have installed 3 wiki instances (not as a farm). Looking at the following link on the HelpOnEditing page

 * wiki:Self:HelpOnPageCreation#variablesubstitution - which variables are substituted (like @''''''SIG@, @''''''MAILTO@ ...)

generates a link to one of the other wiki instances. This is 'cured' when 'wiki:' removed.

Could not find a match for url

I'm getting: Could not find a match for url: "10.0.0.27:85/personal-wiki/moin.cgi/?". Check your URL regular expressions in the "wikis" list in "farmconfig.py".

Solution

If you are not running a wiki farm, delete farmconfig.py from your wiki directory.

Verification failed for Unrouteable address Sender verify failed

My users get this error when they save pages other people subscribed.

Solution

Make sure your mail_from is set to a legal address, e.g "My Wiki <noreply@mydomain", when mydomain is real domain.

Newsfeed under the weather

2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)] The newsfeed appears to be rendering the RSS successfully when I check the link in my browser, but the feed doesn't load into Firefox when it is Live Bookmarked. This MoinMoin wiki is using the farmconfig.py but I placed the Link Rel in the local mywiki.py config file. What could be wrong?

  • Did you try it without html_head?

I did and it doesn't render the RSS instruction in the (html) page header at all! BTW: the failure is because of the XMLNS being <rdf:RDF xmlns:None="http://purl.org/rss/1.0/ ... Why is it xmlns:None? If I save the output file and remove the offending ":None" the file can be successfully read by any news aggregator.

I found a solution - it appeared, at least on my config to require Python2.4.

However, XSLT (even when enabled in the config.py file) from the page XsltVersion returns "XSLT processing is not available!". Is there some other switch than needs to be enabled or action taken? Is it unable to locate a library. Now using Python 2.4.1 (#2, May 5 2005, 11:32:06) [GCC 3.3.5 (Debian 1:3.3.5-12)], with MoinMoin 1.3.4 [Revision 1.3.4 release].

Does anyone who has used XSLT ever read this page? Come on - what needs to be set in order to make this feature work?

  • I don't use it, but you need 4suite installed. Exactly. So, initial reporter, why did not you find the advise to install 4suite? This is documented at multiple places.

WikiWord would not appear with Spaces as Wanted in the UserPreferences

Solution

edit the wiki.py script and locate the following lines

# handle anchors
parts = word.split("#", 1)
anchor = ""
if len(parts)==2:
    word, anchor = parts
#here the change
return (self.formatter.pagelink(1, word, anchor=anchor) +
        self.formatter.text(text) +
        self.formatter.pagelink(0, word))

input the following lines

if self.request.user.wikiname_add_spaces:
    split_re = re.compile('([%s])([%s])' % (config.chars_lower, config.chars_upper))
    text = split_re.sub(r'\1 \2', text)

Email: <Werner DOT Hoevelmanns AT schmiechen DOT de>

/!\ I have done exactly as described above, but don't get any result. WikiNames are still written as "WikiNames" and not as "Wiki Names" as should be. If you have any solution or explanation, please publish here, mail me, if possible and delete this text!

<mail AT benschwarz DOT de>

ImportError: No module named wikiconfig

I done all steps as described in the configuration docs word by word. I'm using Foo OS 3.1 with apache2 (I also tryed apache 1.3). When I try to browse the wiki I allways get this error:

  • ImportError: No module named wikiconfig Check that the file...

This error tell you that the moin can't find wikiconfig.py module. This can be caused by:

  • Wrong permissions
  • Wrong ownership
  • You renamed the file
  • If you used farmconfig.py, the wiki names in the wikis list may be wrong.

reference to mywiki for HelpOnEditing / SyntaxReference

I have installed moinmoin using Apache. The wiki is called "twmwiki" and everything seems to work fine. I can edit pages and display them and I can also view the content that came with the installation like HelpOnEditing etc. as long as I use the links from the frontpage. What does not work are the links from the editing page where it says "For more help, see HelpOnEditing or SyntaxReference.". Those link to http://localhost/mywiki/HelpOnEditing which of course does not exist and therefore only returns a 404 error.

I wonder whether this is a configuration error (I could not find any references to "mywiki" in my configuration or a bug in moinmoin? -- twm

  • Use cachecleaner script after configuration changes.

    I was afflicted with the same problem. HelpOnEditing and SyntaxReference (at the bottom of the edit(text)-page) pointed to host/instance_name/page, but they should point to host/page. ThomasWaldmann suggested to clear data/cache/i18n. That solved the problem.

Missing SyncPages Action on Desktop Edition

I try to synchronize content of my web based wiki with a Desktop Edition (for offline editing). When I start the synchronisation I got the following error:

Unknown action SyncPages

Is there any possibility to install/activate this action for the local edition?

Getting [Error 17] Cannot Create a file when that file already exists

I move one wiki instance from one machine to another. It is fine to show the initial page, but when everytime I click a link inside of the initial page. An error message always shows up said [Error 17] Cannot Create a file when that file already exists. This is the url display in address bar http://127.0.0.1/dblue/moin.cgi/dBlueHome. But if i manaually type URL like that myself in address bar http://127.0.0.1/dblue/moin.cgi/dBlueHome?highligh=%28dbluehome%29 or do the search from search field and it turns out showing content fine.

data_underlay_dir "/srv/www/vhosts/name/cgi-bin/daten/moin/intern/data/underlay/" does not exists, or has incorrect ownership or permissions.

Today is the day.. ok, small problem. I setup a complete new wiki. python... import MoinMoin ... CTRL+D perfect the data directory is beyond cgi-bin the wikiconfig.py is within /srv/www/vhosts/name/cgi-bin/daten/moin/intern/ .. .pyc is generated From the wikiconfig.py:

   data_dir = '/srv/www/vhosts/name/cgi-bin/daten/moin/intern/data/'
    data_underlay_dir = '/srv/www/vhosts/name/cgi-bin/daten/moin/intern/data/underlay/'

The Rights are 770 from /srv/www/vhosts/name/cgi-bin/daten/ down The group + Username are ok (if y change them, the wikiconfig.py is no longer loaded)

So: the wikiconfig is loaded but the underlay dir never found. I tried: ./underlay/ underlay/ daten/moin/intern/data/underlay/ and ./daten/moin/intern/data/underlay/ and of course the absolut path.

Ah, to create the instance I took: createinstance.sh with: INSTANCE=/srv/www/vhosts/name/cgi-bin/daten/moin/intern

I'am out of Options. :( Any ideas? oh, apache config is fine. it hast a Alias for moin.cgi in the cgi-bin directory mentioned above.

Traceback:
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
   1.
      /usr/lib/python2.4/site-packages/MoinMoin/multiconfig.py in getConfig (url='name.com/intern')
         1. 158 configName = _getConfigName(url)
         2. 159 try:
         3. 160 config = _config_cache[configName]
         4. 161 except KeyError:
         5. 162 config = _makeConfig(configName)
          * config undefined
          * global _config_cache = {}
          * configName = 'wikiconfig'
KeyError
'wikiconfig'
    * args = ('wikiconfig',)

-- Max 2007-04-09

Error While Saving Page

When I am trying to save the pages I get the following error. I am setting up MoinMoin on Windows XP and IIS

File "C:\Moin\Lib\site-packages\MoinMoin\request.py", line 1151, in run
    handler(self.page.page_name, self)
  File "C:\Moin\Lib\site-packages\MoinMoin\wikiaction.py", line 659, in do_edit
    savemsg = pg.saveText(savetext, rev, trivial=trivial, comment=comment)
  File "C:\Moin\Lib\site-packages\MoinMoin\PageEditor.py", line 976, in saveText
    mtime_usecs, rev = self._write_file(newtext, action, comment, extra)
  File "C:\Moin\Lib\site-packages\MoinMoin\PageEditor.py", line 867, in _write_file
    glog.add(self.request, mtime_usecs, rev, action, self.page_name, None, extra, comment)
  File "C:\Moin\Lib\site-packages\MoinMoin\logfile\editlog.py", line 178, in add
    self._add(line)
  File "C:\Moin\Lib\site-packages\MoinMoin\logfile\logfile.py", line 406, in _add
    self._output.write(line)
  File "C:\Moin\Lib\site-packages\MoinMoin\logfile\logfile.py", line 139, in __getattr__
    self._output = codecs.open(self.__filename, 'a', config.charset)
  File "C:\Python23\lib\codecs.py", line 566, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13]   File "C:\Python23\lib\codecs.py", line 566, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: 'data\\edit-log'

What wrong I am doing ??

Abhishek

'module' object has no attribute 'getmro'

I followed the HelpOnInstalling/BasicInstallation instructions carefully, and while most of the test steps seem to work (e.g., "import MoinMoin" is fine), when I run moin.cgi either on the command line or via Apache (CGI), I get:

  [...long traceback...]
  File "/usr/local/lib/python2.3/site-packages/MoinMoin/support/copy.py", line 74, in _getspecial
    for basecls in inspect.getmro(cls):
  AttributeError: 'module' object has no attribute 'getmro'}

Same error when I run runtests.py. Apache runs the CGI script but of course moin.cgi is returning a 500 error complaining about this missing attribute. I looked at line 74 of copy.py, and all it's doing is "for basecls in inspect.getmro(cls):". Well, python sure thinks it has it:

[...]
>>> import inspect
>>> inspect.getmro
<function getmro at 0x81d4fb4>

I thought perhaps I wasn't using the right python, so I replaced moin.cgi's #!/usr/bin/env python with an explicitly specified python (2.3) that's the same as the one my shell's PATH prefers. No difference. Help!

Please:

  • check if the python you run interactively is the same as for cgi (chroot? path?)
  • we need the complete python -V output of the python making you troubles
  • you can try copying your python's "copy.py" over the one we deliver in MoinMoin/support. Our copy.py is intended to fix some problems that existed in old pythons, but maybe the one your Python has works better for you.

Moving my Wiki from one PC to another

I am evaluating MoinMoin as a project managment and tracking tool for my work group. I am running it on Windows XP. I recently have had my PC upgraded. The original copy of my Wiki is still running on the old PC but I need to port it over to the new one. I installed Moin, Python, Pyxml etc on the new PC. Next I followed the directions provided in the installation heklp page to create my Wiki again, making sure the name was the same as before. Finally I copied the User and Pages directories within the \MyWiki\Data folder with the onces running on my old PC. Now when I go to my Wiki on the new PC I get the message:

IOError

[Errno 13] Permission denied: 'data\\pages\\<My_Wiki_Name>\\cache\\text_html'

I am at a loss. Any suggestions?

Are you sure that you have used the right owner for the files on the second new XP windows system. Is it the same owner as the wiki instance you have removed and does have this worked before? -- ReimarBauer 2006-05-26 09:58:23

-- Laiq on Friday May 26th, 2006 at 12:13 PM: Thankyou for your response. I really hope you can help me with this.

The Wiki is running fine on the old PC and my user profile and access rights etc in the new PC should be the same as in the old PC.

Yesterday I went in and renamed the text_html file under the all the data\\pages\\<page_name>\\cache folders. With this change I am now able to load and see the Wiki correctly. But now when I edit any page and then try to preview or save it I get the following error and the changes are not saved:

Page could not get locked. Unexpected error (errno=13).

Looking at the traceback it seems the error is coming from: C:\Moin\Lib\site-packages\MoinMoin\PageEditor.py in _write_file

Also now when I run the self-test I see the following errors:

====================================================================== ERROR: testBasicPackageThings (MoinMoin._tests.test_packages.UnsafePackageTestcase)


  • Traceback (most recent call last):
  • File "C:/Moin/Lib/site-packages\MoinMoin\_tests\test_packages.py", line 54, in setUp

    • raise TestSkipped('This test needs to be run using the test wiki.')

TestSkipped: This test needs to be run using the test wiki.

====================================================================== ERROR: user: login with ascii password


  • Traceback (most recent call last):
  • File "C:/Moin/Lib/site-packages\MoinMoin\_tests\test_user.py", line 95, in testAsciiPassword

    • theUser = user.User(self.request, name=name, password=password)

    File "C:/Moin/Lib/site-packages\MoinMoin\user.py", line 270, in init

    • self.id = getUserId(self._request, self.name)

    File "C:/Moin/Lib/site-packages\MoinMoin\user.py", line 68, in getUserId

    • cache.update(pickle.dumps(_name2id, PICKLE_PROTOCOL))

    File "C:/Moin/Lib/site-packages\MoinMoin\caching.py", line 92, in update

    • f = open(self._filename(), 'wb')

IOError: [Errno 13] Permission denied: 'data\\cache\\user\\name2id'


  • The second error regarding the user:login is new.

THe first error is there on the wiki runnning on my old PC as well so I think we can ignore it for now.


The "Page could not get locked. Unexpected error (errno=13)." error happened to me because the permissions weren't right in the data directory -- the owner/group hadn't been changed to www-data. I needed to do e.g. chown -R www-data:www-data data .

  • peter

Internal Server Error - Problem with request.py

Hi, this is probably a typical case of PEBKAC, but maybe you could help anyways?

I just tried to set up a MoinMoin Wiki on my computer to try it out. I followed the instructions on this Wiki regarding installation but when I try to open it, i get an internal server error.

My Software: WinXP; Apatche 2.2; Python 2.4.3

the apatche error log entry reads as follows

[Tue May 30 09:57:39 2006] [error] [client 127.0.0.1] (OS 5)Zugriff verweigert  : couldn't create child process: 720005: moin.cgi
[Tue May 30 09:57:39 2006] [error] [client 127.0.0.1] (OS 5)Zugriff verweigert  : couldn't spawn child process: C:/moin/mywiki/moin.cgi

NOTE: Yes, my moin Instance is in c:/moin/mywiki

when I rename moin.cgi to moin2.py and run it in idleI get the following traceback:

Traceback (most recent call last):
  File "c:\Python24\Lib\site-packages\MoinMoin\request.py", line 1372, in __init__
    msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
AttributeError: PyShell instance has no attribute 'fileno'

I didn't touch request.py. *scratches head*

Help would be greatly appreciated, thanks in advance!

Fischi

I also am having the same problem have you solved this yet?

Bryan

Try testing it starting the python interpreter from a cmd, not with idle.

  • I've had the same problem. In my case the shebang (1st line with the #!) of the moin.cgi script was incorrect. When i changed it to the absolute path to my python.exe, the error was gone and the wiki started. E. g.: #!c:/Programme/Python/python.exe

  • Anselm

Cannot allocate memory ?

I've seen this message in my apache error log on several occaitions. Cannot allocate memory: couldn't spawn child process: /var/www/ACDCWiki/cgi-bin/moin.cgi Any ideas on what can be done to fix this?

  • Do you have any resource (memory) restrictions in place for cgi scripts? If yes, they are maybe not high enough.
    • No not that I know of. I have a standard Apache 2.0.46 installation. Python 2.4. Although I have only 128mb ram. Could that be an issue?
      • If you are that low on RAM, you should at least have a bigger swap partition / swap file. Maybe use top (Linux) or some other tool on your OS to monitor RAM usage. If you don't need apache2 for other stuff, you could also use moin standalone server and save the memory needed for apache2 and also the startup time needed to load python and libs (standalone stays resident in memory all the time).

Very narrow editor text area

When editing a page, the editor box is about 13 characters wide.

Solution

The cause is missing css files:

  1. Try to reload the page few times
  2. Try to delete the browser cache
  3. Check that your url_prefix is configured properly.

EMail again

I tried to set up EMail notification, but get

{u'foo@bar': (554, '<foo@bar>: Recipient address rejected: Access denied')}

(with a real address, of course) when I try to mail something. I'm not sure if the mail system chokes on the unicode notation. Worse: After removing the entries from mail_smarthost and mail_from, the EMail button remains on the user preferences page.

  • Then your mailserver seems to be setup incorrectly. Ask the administrator. And the last issue looks like your configuration change is not sensed. Try to make sure that you edited the correct file and clean all related .pyc files. The email button in the user preferences page is new addition, it may be broken and ignore the mail configuration. Note that the "Subscribe" and "Unsubscribe" links are not displayed when email is not configured.

Is there any way to find out if MoinMoin received any errors from the SMTP session?

  • Sure, just look at the status message you see after you have saved the page.

Interesting. I managed to find a configuration error on my part, but fixing that doesn't actually make things work. I can now get email sent when I click the "Mail me my account data" button on the UserPreferences page, but I don't get change notifications when I use a test-user login to make changes to a page, but I do get a long traceback where the smptlib module tries to base64-decode something that isn't encoded. Since the traceback includes password information, I'll have to try and debug it myself. I'm using Python 2.4.1 and MoinMoin 1.3.5.

Wiki runs fine just won't save pages!

I'm running MoinMoin on Fedora 4, Apache 2.0.54, Python 2.4 with mod_python-3.1.4 (as a DSO, no alternative there). The wiki works fine, and I can view the basic pages. The file permissions are set to the webserver name:group, and can write files as it writes the edit-lock file when you preview a page. However, it just will not save any pages! Is there any finer grained logging available than that in httpd's error_log? That gives the very unhelpful error

 [Tue Oct 11 15:16:11 2005] [notice] child pid 28195 exit signal Segmentation fault (11) 

Any help would be appreciated.

  • SIG11 often is related to hardware problems, most often bad RAM or CPU. Maybe use memtest86+ to check if your RAM is working ok.

I'm not convinced it's a hardware problem, as it's a new Supermicro box which has no obvious problems at all. I'll have a look at the memtest you suggested though. All other apps/services are working fine. Thanks for the propmt reply, Thomas. I'll try recompiling mod_python with different options as I compiled Apache to use MPM worker thread. Found the following here:

  • "Overall, segmentation faults in mod_python are more likely to be caused by Apache, mod_python and Python being built with differing ideas of how threading is supposed to be enabled."

That maybe true... but it didn't help. I tried compiling Apache with the mpm_prefork option (and recompiling mod_python) but it gave me the same error, though strangely it appeared twice (two error messages) for mpm_worker and only once for mpm_prefork. Go figure. I gave up! If anyone resolves this I'd love to see a solution posted here.

Install error

/usr/local/python-2.4.2/share/moin/server>python moin.py Traceback (most recent call last):

File "/usr/local/python-2.4.2/lib/python2.4/site-packages/MoinMoin/server/standalone.py", line 41, in ?

  • import os, sys, time, urllib, socket, errno, shutil

ImportError: No module named time

How do i go about solving it??

Start an interactive interpreter by entering python and do a manual import time there. If it also fails, get a non-broken python installation. If it works, check if you broke sys.path somewhere in the moin scripts.

New Wiki Installation: Can see FrontPage, but can't edit??

I just installed my first wiki pages on an apache server running on Linux. Installation was smooth enough. And I've read over the docs and troubleshooting multiple times. I can see the front page when I load http://my.server.com/mywiki, but none of the other pages load when clicked, including Edit! So I'm stuck with a FrontPage. The diagnostic /mywiki?action=test looks fine, all OK. I'm definitely seeing the moin.cgi file and the wiki .py config file, because the FrontPage displays custom images and text, so I'm fairly sure my httpd.conf is OK. And my python files are in the default location, which I have even tried explicitly identifying in the config file. Permissions on all relevant directories is set to apache.apache (same as in my httpd.conf) and mod is a+rX. Any other troubleshooting ideas? I feel like I'm so close!

When I click 'Edit' I get:

  • Not Found

The requested URL /mywiki/FrontPage was not found on this server.

Thanks, Alex

  • ANSWER

I figured out the problem by following an alternate source of installation instructions

The critical issue appears to be the location of the moin.cgi file. I had placed it in a cgi-bin under a copy of htdocs which was all under my wiki instance directory. I had set up an alias and permissions for the htdocs dir to be visible to the server in httpd.conf (but perhaps this was not done properly?). Once I moved the moin.cgi file to my primary cgi-bin located at the same dir level as my default html dir, then it all worked flawlessly. I updated my ScriptAlias to this location and it's all set. Case closed.

  • COMMENT

I am very close, too - but here the reason seems to be different. Whatever subpage I open, it does not exist (404). /var/log/apache2/error.log says correctly:

[Fri Aug 10 20:38:16 2007] [error] [client 10.0.2.10] File does not exist: /usr/share/moin/htdocs/SeiteFinden, referer: http://10.0.2.10/wiki - as: {{{$ ls /usr/share/moin/htdocs applets common index.html rightsidebar classic favicon.ico modern robots.txt

$ locate SeiteFinden /var/www/moinmoin/underlay/pages/SeiteFinden /var/www/moinmoin/underlay/pages/SeiteFinden/current /var/www/moinmoin/underlay/pages/SeiteFinden/revisions }}}

OK, perhaps the same problem here: can see mywiki/moin.cgi but can't see mywiki/moin.cgi/ oder anything like mywiki/moin.cgi/*. Looks like the "/" after moin.cgi isn't interpreted right. Btw, i always do get a 404-error. Any ideas?

The links at the bottom of my edit page are broken. The links that look like the following:

The links are in the form http://example.com/folder/SynataxReference when they should be in the form http://example.com/SyntaxReference. All other links work fine. Only those links refuse to point to the "root" of the server. Why didn't that link change and how do I change it appropriately?

Trouble running with mod_python

I'm currently trying to run moinmoin 1.5.2 with Apache 2.0.64, python2.4 and mod_python 3.0.1. But I get the error [Sat Feb 18 18:48:37 2006] [error] make_obcallback: could not import mod_python.apache.! Any ideas as to what's wrong??

UTF-8 does not work in titles of items

Try http://wiki.r2dvd.info/moin.cgi/Čeština. The problem with char encoding is noticable only if you type the url with utf-8 chars directly in your browser, if u come through the anchor above, everything is fine.

UnicodeDecodeError on moin startup

I'm trying to get desktop moin 1.6.0 running on my office computer which runs Windows XP. When I startup my instance from the command line I get this error:

  • UnicodeDecodeError: 'utf8' codec can't decode bytes in position 25-30: unsupported Unicode code range

I'm not very knowledgeable about Windows: do I need to install an updated codec somewhere? -- AmElder 2008-01-14 19:59:40

  • Without a bug report including traceback this is hard to tell (you don't need an "updated codec" anywhere for sure, though). This problem is likely some config file or wiki content in a wrong encoding. The config tells the encoding in the first line (the config file content has to be in that encoding), the wiki content has to be utf-8.
    • - Thank you, I will submit a bug report, then.

Embedding of object by chosen formatter not possible

I'm trying to attach a file to my page but when I click on the attachment I get the error "Embedding of object by chosen formatter not possible" and it takes me to the attachment page to download it. This is a word doc. I can get it to work using the do=get url but it is advised not to use that. I would like to use the attachment: option without having to go the attachment page to press download.

  • I am having a similar problem in both 1.6.2 and 1.6.3, I didn't seem to have this issue with 1.5.X, although I was also using a different platform. For some reason the wiki is trying to embed the attachment even though it shouldn't based on the mime type of the attached file. I was able to replicate the problem here in the WikiSandBox, so I would guess this is a bug. I will try submitting one. -- JonathanDelgado 2008-05-06 15:54:31

Looking for attachment in wrong directory

I've attached a file to one of my wiki pages and I can locate the file under WIKI/data/pages/PAGE/attachments (so the attachment process works fine). My problem is that I cannot get to the file from the wiki page. When I click the link to the attachement (link made using attachment:file.pdf) I get a blank page. According to /var/log/httpd-error.log, MoinMoin is looking for the file int the incorrect directory. I have my data_dir set in my wikiconfig, and the attachment makes it to that directory when I upload it, but MoinMoin looks in a different directory when I try to download the file. Any ideas? Thanks! Sean

  • Please file a bug report and move this stuff to it. Provide much more details (use the bug template), provide config and log files.
    • I rebuilt python and reinstalled moinmoin and everything works again (by the way, I the problem was on freeBSD, Python2.5 - rebuilding completely fixed things)

After upgrade, instead of starting page only a traceback

Hi, I upgraded from 1.5.8 to 1.6.1. I followed the CHANGES instructions. The data upgrade script went through fine. After starting apache (I'm using mod_python, BTW) and trying the wiki in a Browser, only a traceback like the following occurs:

[Wed Mar 19 22:06:04 2008] [notice] mod_python: Creating 8 session mutexes based on 3 max processes and 25 max threads.
[Wed Mar 19 22:06:04 2008] [notice] mod_python: using mutex_directory /tmp
[Wed Mar 19 22:06:04 2008] [notice] Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 configured -- resuming normal operations
ERROR:root:RuntimeError: maximum recursion depth exceeded in cmp
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 1248, in run
    self.page = wikiutil.getFrontPage(self)
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/wikiutil.py", line 783, in getFrontPage
    return getLocalizedPage(request, request.cfg.page_front_page)
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/wikiutil.py", line 752, in getLocalizedPage
    i18n_name = request.getText(pagename, formatted=False)
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 273, in <lambda>
    self.getText = lambda text, i18n=self.i18n, request=self, lang=self.lang, **kv: i18n.getText(text, request, lang, **kv)
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/i18n/__init__.py", line 257, in getText
    dicts = request.dicts
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 366, in getDicts
    dicts.scandicts()
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/wikidicts.py", line 376, in scandicts
    if Page.Page(request, pagename).mtime_usecs() >= self.pageupdate_timestamp:
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/Page.py", line 704, in mtime_usecs
    for line in logfile.reverse():
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 110, in reverse
    self.to_end()
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 342, in to_end
    self._input.seek(0, 2) # to end of file
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 158, in __getattr__
    return self._input
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 158, in __getattr__
    return self._input
[... same stuff few hundred times ...]
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 158, in __getattr__
    return self._input
  File "/usr/local/lib/python2.4/site-packages/MoinMoin/logfile/__init__.py", line 132, in __getattr__
    if name == "_LogFile__rel_index": # Python black magic: this is the real name of the __rel_index attribute
RuntimeError: maximum recursion depth exceeded in cmp
[Wed Mar 19 22:06:57 2008] [notice] caught SIGTERM, shutting down

Any clues on how the error could be fixed? Seems to me like some log file problem. Permissions are fine though. :\ I'm open for any tips. -- BjörnSchließmann 2008-03-19 22:51:23

  • Looks like it can't access a page's edit-log. Please check owner/group/mode of your pages (and use chown -R x.y data ; chmod -R ug+rwX data to set correct owner, group and mode). Especially have a look at data/pages/*Dict/edit-log. If that does not help, apply this patch and retry: http://hg.moinmo.in/moin/1.6/rev/6b64b2cdef2f -- ThomasWaldmann 2008-03-19 23:14:22

    • Thank you for the quick help :) I managed to solve the problem. It was an edit-log, but not in data, but in underlay, as your helpful patch eventually showed (strange, I didn't touch this directory during the upgrade). BTW, is it normal that I have to re-install language packages after upgrade? This should be mentioned in the upgrade guide (or I missed it) -- BjörnSchließmann 2008-03-20 23:11:33

After upgrade, TableOfContents macro not working with maxdepth

Hi, I've just upgraded from 1.6.0 to 1.7.2 with no problems.

However, when I access the wiki, many of the pages use the TableOfContents macro with the default code as follows:

<<TableOfContents([maxdepth])>>

But when this is rendered it fails with the following error:

<<TableOfContents: Argument "maxdepth" must be an integer value, not "[maxdepth]">> 

I can work around this by entering an integer (e.g. 99) instead of maxdepth but that will be painful to change on all of the pages in my wiki.

Any ideas? is there a default to set for maxdepth somewhere?

Anyone else had this problem?

Thanks, Tom, UK

(!) Maybe you have misunderstood its syntax. When describing some syntax, stuff like [foo] usually means an optional parameter called foo at that place, not that you should type [ f o o ]. So you either can leave it empty or enter an integer at that place. -- ThomasWaldmann 2008-10-17 02:48:19

Hi, thanks I know that but what happened in 1.6.0 was that when you applied the TableOfContents macro, using the GUI editor, it would default to include this maxdepth value, and when rendered, it would display the full tableOfContents. So the users of my Wiki tended to leave this asis which worked fine. Now I've got lots of pages which have this set which aren't displaying the TableOfContents properly :-(

So maybe this is another symptom of the GUI editor as when using text editor you'd have to type the macro in anyway.

Can't create users after upgrade 1.6->1.7, UserPreferences does not exist (Debian)

After upgrading from 1.6 to 1.7 on debian and creating a fresh wiki instance, I clicked on "login" where a line of text says (like in 1.6) I should go to UserPrefrences to create a new account. However that page does not seem to exist. I even searched /usr/share/moin for it, it simply isn't there. Also manually adding a "?action=newaccount" to the starting page url didn't help.

Thanks for any answers, Henning

Hi Henning, please read docs/UPDATE.html and do all steps mentioned there, you likely missed the step to install the new underlay dir to your wiki instance. The systempages and language packs of MoinMoin are kept in the underlay dir. -- ReimarBauer 2008-10-29 10:05:17

Thanks for the quick answer but that doesn't seem to be the problem. What I did was:

  • Upgrading from 1.6 to 1.7 with debians package management system
  • Creating a new wiki ofter the documentation, ie. copying fresh data and underlay dirs from /usr/share/moin
  • Setting up /etc/moin/farmconfig.py to include the new wiki and creating /etc/moin/mywiki.py (which includes absolute and correct paths to underlay and data.

Also I tried renaming the underlay dir (to underlay.bak) which instantly lead to an error message on the new wiki, so it definetely searches in the right place. I also tried reinstalling the moinmoin package (with the package manegement system), and copying data and underlay from anew, but that didn't help either.

I'd guess theres something messed up with the debian package, but I can hardly imagine, since this problem occurs for months now and I can remember at least one new debian package version which did not fix this.

Henning

Solution

Darn, I finally found out, that not the underlay is the problem but a moinmoin version I had manually installed in /usr/local ages ago. (an "import MoinMoin" followed by a help(MoinMoin) showed me). Thanks for your time, nevertheless :)

np. Can you tell which MM version debian has now (1.7.x)?

At 2008-11-14 this is 1.5.3-1.2etch in stable, 1.7.1-2 in testing and 1.8.0beta1-1 in experimental. (Obviously I use testing ;))

Getting Traceback about Unicode

I have moin 1.5.4 running on a hosted server with Python 2.4.3 . The wiki has run great for a long time. Then suddenly a couple months ago, every attempt to search has resulted in the same traceback error.

I'm reluctant to vertically bloat this section, so I've attached the traceback as an attachment, Davison_Unicode_Trace.html.

If it's helpful to recreate on the original site, here's my link: http://mycompiler.org/Compiler_Wiki/moin.cgi/FrontPage

I'm also trying to get help from my ISP, but I'm almost sure there will come a point where the Moin team can't help more without info. on the python install, and my ISP will think it's a problem with Moin.

Any help greatly appreciated!

(!) Some ideas:

  • Did you enable Lupy for indexed search in your wiki config? If yes, I suggest you switch off Lupy.
  • If you don't want that, you could also try rebuilding the search index.
  • From the error msg, one could also think that the Python is somehow inconsistent internally - some part (C array module) tries to use stuff that is not there. Maybe Python was compiled with wrong features (Python should be always support UCS4, that is 32bit Unicode).
  • If ones looks at RecentChanges in that wiki, one finds another problem: the global edit-log is damaged in its structure (one can usually fix that with vim or so).

  • As a general note, moin 1.5.4 is rather old, you should upgrade it. The upgrade to 1.5.9 should be rather easy (that fixes some bugs, but is still old), the upgrade to 1.8.x will take a bit more effort.

-- ThomasWaldmann 2009-03-02 07:23:53

Some users try to save an edit, but delete the page!?

I have a wiki (1.8.1) running on an intranet at work. I am super user and have no problems editing, but when some other users try to make an edit to a page, the page gets deleted. I have to then go back to the page's revision history and revert to a former version to resurrect the page. Any ideas?

Which OS, fstype do you use on the server? Which browser do you and which do they use? super user has nothing to do with storing a page. It is more for suid or to access some special macros.

The wiki is hosted on Ubuntu 8.10 with ext3 FS. The clients are using Win2K with IE6.

Problem solved: It turns out it was down to 'user error'. On clicking 'Save Changes' some users showed a little impatience by clicking 'preview' or 'cancel' buttons before the web page had refreshed back to the normal read-only view. This seems to cause the save operation to fail and the page disappears from the wiki. It is possible to re-instate the page by reverting to the previous version.

Is this a known bug/feature/vulnerability?

Many thanks for your help.

(!) No, not known yet. Please file a bug. Try to reproduce it with Firefox or some other browser. Give more information about your server installation. Remove this section here after filing the bug. -- ThomasWaldmann 2009-03-11 10:25:00

Cannot see Python traceback

Installed version 1.8.4 recently. While doing some changes in sources I've came across the problem that I do not get any traceback in the browser window when there are errors in python code. Just see the empty page. How do I switch this on? (in 1.5.5 I think I saw the traceback with default config).

Tried adding traceback_show=1 to my wikiconfig.py and enabling os.environ['MOIN_DEBUG']='1' in moin.wsgi, but that didn't help.. -- AlexanderAgibalov 2009-06-25 13:23:26


CategoryMoinMoinBug

Installing and upgrading

Edit this page

Contents

  1. Stackless Python
  2. MoinMoin with WSGI can't find datadir
  3. Desktop MoinMoin on memory stick accessible by windows and mac
  4. Configuring DocBook rendering
  5. Themes
  6. Install at provider
  7. Farm on the intranet
  8. Apache2: where to put the stuff that goes in httpd.conf
  9. Enable RSS feed for RecentChanges
  10. No CSS on standalone wiki on lighttpd
  11. www.example.com/cgi-bin/moin.cgi/ vs. www.example.com/cgi-bin/moin.cgi
  12. cgiwrap gives ugly URLs, can it be fixed?
  13. Problems with permissions? (WinXP SP2, Apache2.2.2, Moin1.5.3)
  14. Upgrade from Desktop edition to standard edition with Apache and retain URLs
  15. Desktop Wiki on a Memory Stick
  16. AMD64 Version?
  17. Another way for Root Wiki?
  18. Cannot get themes to work
  19. Problems starting moin (initial install)
  20. Changing the URL
  21. Updating from 1.0 to 1.3.5/1.5.0
  22. After installing 1.5.1 over 1.5.0 the subscription is gone
  23. How to install a moinmoin wiki farm
  24. How to move a wiki instance from one machine to another
  25. Installation via FTP
  26. IIS questions
  27. 404 error
  28. 500 error
  29. Configuring a wiki at http://example.com/foo/bar/wiki with mod_python
  30. Quota exceeded on Linux ISP while installing - can I remove unwanted languages?
  31. Processing HTML
  32. setup.py and moin.cgi
  33. How to Upgrade from 1.3.5 to 1.5.0
  34. Installing on Fedora: permission denied & SELinux
  35. Installing moinmoin on hosted webserver
  36. Installing moinmoin
  37. Import Error
  38. Hosted Webserver / MoinMoin generates dysfunctional links
  39. Problem when installing on Windows XP with Apache 2.2.4 and Python 2.5
  40. Need dictionary file
  41. Going crazy trying to upgrade
  42. error: package directory 'MoinMoin' does not exist
  43. Embed external non-wiki page
  44. Problems installing (Windows XP SP2, Apache 2.2.2, Python 2.5.1)
  45. Migration from 1.3.3 to 1.5.8
  46. Using MoinMoin on smartphone (symbian) via Raccoon
  47. Migration from 1.5.7 to 1.6.0
  48. manual update to 1.6.0
  49. Permission denied when trying to migrate data
  50. Problems Moving Moin to another server
  51. It´s not that easy getting a standalone to work
  52. Problems with basic installation
  53. Is it possible to change/add themes without access to /wiki/ directory?
  54. Problem installing with linux + lighttpd + fastcgi + unix socket + site directory (not subdomain).
  55. Just installed MoinMoin v1.8.0 and the GUI editor isn't working
  56. Guide for MoinMoin on a memory stick?
  57. Is there a way to change global variables?
  58. GUI Editor not installed/configured??
  59. After upgrade MoinMoin 1.6 --> 1.81 edit page no more possible
  60. After upgrade one of the farms fails to import theme module

Stackless Python

Does MoinMoin Support Stackless Python explizit or are there any known issues? On MoinMoin 1.8.3 (Standalone Server) with Python 2.5.2 Stackless under Windows XP it works and I couldn't find in a short test any errors or traceback.

Python Version
    2.5.2 Stackless 3.1b3 060516 (release25-maint:63825M, May 30 2008, 21:23:25) [MSC v.1310 32 bit (Intel)]

any feedbacks would be nice :-) -- MarcelHäfner 2009-05-06 16:25:41

  • Answering myself: Stackless should be 100% compatible for use of normal Python code. If you have Stackless installed and you use Python code which does not make any use of the Stackless functionality, that code should behave exactly the same as it would in a normal Python installation http://zope.stackless.com/wiki/FAQ

MoinMoin with WSGI can't find datadir

I have set up moinmoin 1.8.2 with cgi successfully. My Config-Files, the moin.cgi, the data dir,.. are all in the folder /web/thiswiki/ . For cgi I used this apache config:

Alias /moin_css/ "/usr/share/moin/htdocs/"
ScriptAlias /thiswiki      /web/thiswiki/moin.cgi

which worked. Now I installed and loaded the apache WSGI-Mod. I tried this apache-config:

WSGIScriptAlias /thiswiki      /web/thiswiki/moin.wsgi
WSGIDaemonProcess thiswiki user=www-data group=www-data home=/home/www-data processes=5 threads=10 maximum-requests=1000 umask=0007 display-name=wsgi-moin
WSGIProcessGroup thiswiki
WSGIPassAuthorization On

WSGI is correctly loaded by apache. But If I wanna now access the wiki I'm always getting the error:

data_dir "data" does not exist, or has incorrect ownership or permissions.

Make sure the directory and the subdirectory "pages" are owned by the web server and are readable, writable and executable by the web server user and group.

It is recommended to use absolute paths and not relative paths. Check also the spelling of the directory name.

Error in your configuration file "/usr/lib/python2.5/site-packages/MoinMoin/config/multiconfig.py" around line 189

But the data folder has the correct permissions and the WSGI-processes have the correct owner www-data. Any idea what goes wrong here?

show us the line of moin.wsgi you changed to point to the path of your wikiconfig.py and also show us the data = line of that wikiconfig.py -- ReimarBauer 2009-04-15 11:36:38

Please also report the actual mode of the data directory (e.g. drwxr-xr-x), the owner (at least whether or not it is the web server agent). You can use 'bash> ls -l ...' on the data directory to learn its mode and owner. You can use 'bash> grep -E '(User|Group) ' /etc/apache*/*.conf to learn the web server agent user and group, 2009-05-09 23:23:12

(!) drwxr----- and dependent on your configuration www-data.www-data as owner is mandatory. -- ReimarBauer 2009-05-10 06:31:35

Desktop MoinMoin on memory stick accessible by windows and mac

Is it possible to run the same desktop wiki from the memory stick once on Windows XP PC and later on MAC and back?? What I should do to be able to do so ??

Configuring DocBook rendering

I've followed the instructions at HelpOnXmlPages, but cannot get the DocBook renderer to work. I'm running on a Windows Server 2003 box (IIS ver 6.0), and have MoinMoin 1.5.8, Python 2.5.1 and 4Suite-XML 1.0.2 installed. XSLT is enabled, everything according to the setup instructions.

However, when I click on 'Render as DocBook', I get the 'You need to install PyXML to use the DocBook formatter' error. Is there something I'm missing? I'm not a Python expert, so I'm struggling to trace the error and see whats going wrong. Any ideas?

Keith Fletcher, 2007-10-19

Themes

I have the same trouble with bulleted lists as described above (no scheme is being shown). But I cannot find any reason or solution. I am running Suse Linux 10.1 as admin. Wiki itself is working fine.

My wiki is called DaCapo and stored at /wiki/DaCapo

My Apache-Entry:

Alias /wiki/ "/usr/share/moin/htdocs/"
ScriptAlias /DaCapo "/wiki/DaCapo/cgi-bin/moin.cgi"
<Location /DaCapo>
        order deny,allow
        deny from all
        allow from localhost
        allow from 192.168.1.254
        AuthType Basic
        satisfy any
</Location>

My setting to /wiki/DaCapo/cgi-bin/moin.cgi

sys.path.insert(0, '/usr/lib/python2.4/site-packages/ ')
sys.path.insert(0, '/wiki/DaCapo')

My wikiconfig.py entries:

logo_string = u'<img src="/wiki/DaCapo/DaCapo.png">'
data_dir = '/wiki/DaCapo/data/'
data_underlay_dir = '/wiki/DaCapo/underlay/'
url_prefix = '/wiki'

If I try http://localhost/wiki/modern/css/screen.css then I get "accedd denied".

Could anybody help me? Thank you very much, Matthias

Finally I found the error. To others having the same problem: Please check HelpOnInstalling/ApacheOnLinux at the end. The following worked fine within httpd.conf

Alias /wiki/ "/usr/share/moin/htdocs/"
<Directory "/usr/share/moin/htdocs/">
    Order deny,allow
    Allow from all
</Directory>

ScriptAlias /DaCapo "/wiki/DaCapo/cgi-bin/moin.cgi"
<Directory "/wiki/DaCapo/cgi-bin/">
    Order deny,allow
    Allow from all
</Directory>

Install at provider

I have a personal homepage hosted at a provider. Updating is easy done by uploading the HTML and PHP code. I don't have access to /usr or similar directories. How do I install MoinMoin there ?

  • -- Thomas 2007-03-04 15:21:01

Ok - i did a workaround: In installed moinmoin on my home-PC's home directory: /home/myname. It took some time to figure qout which files to edit and how. Finally I had a wiki running at http://localhost/:8000 using the moinmoin-internal server. Should be easy to transfer that to my home-directory at my provider - I thought. I copied all moinmoin directories from my local home directory to my provider. I then edited all config files as described for the cgi installation. Finally I ended with this error message:

  • - 1 CGI returned nonzero status Traceback (most recent call last):
    • File "/kunden/homepages/...morepathinfo.../cgi-bin/moin.cgi", line 44, in ?
      • from MoinMoin.request import RequestCGI

    ImportError: No module named MoinMoin.request STDOUT OK STDERR OK -- Thomas 2007-03-04 15:21:01

Farm on the intranet

  • I am working on setting up various wikis for different departments on the company intranet. I was able to get a single wiki working without much trouble. I am using standalone and I am having trouble setting up farmconfig.py correctly or I am incorrect in the way I think it will work. I have modifed my farmconfig.py wikis = [...

 wikis = [
    ("ProductionDeveloper", r"^server/proddev/.*$"),
    ("ApplicationDeveloper", r"^server/appdev/.*$"),
]
  • I am getting errors

Could not find a match for url: "server/FindPage".

Check your URL regular expressions in the "wikis" list in
"farmconfig.py".

and

Could not find a match for url: "server/proddev?action=edit".

Check your URL regular expressions in the "wikis" list in
"farmconfig.py".
  • Am I configuring the wiki farm to only work on sub pages? Can I create a farm like above or do I have to have something like below:

 wikis = [
    ("ProductionDeveloper", r"^proddev.server/.*$"),
    ("ApplicationDeveloper", r"^appdev.server/*$"),
]
  • I apologize for posting 3 times. I wanted to try to convey my problem as clearly as possible. It appears that my regular expression is incorrect. I have modified it in many ways and I am not getting the desired results.

    Thank you for your time in advance BobStrickland 2006-04-18

Apache2: where to put the stuff that goes in httpd.conf

I tried following the readme to get MoinMoin to work, but it tells me to put some stuff into httpd.conf, which is the apache1 way of doing things. When I did it anyways, it didn't work. So, where in the apache2 config do I put this:

Alias /wiki "/usr/share/moin/htdocs/"
ScriptAlias /MyWiki "/var/www/moin/moin.cgi"

I think: /etc/apache2/sites-available/default

-- kamagurka 2006-08-24 09:24:20

  • For IP-based hosting, try /etc/httpd/conf/vhosts/Vhosts.conf and for name-based, try /etc/httpd/conf/vhosts/nameBased/whatever.conf. Hope that helps.

To store user options there should be a file /etc/apache2/httpd.conf beside the file apache2.conf. You can then put the stuff in httpd.conf and it will be respected by apache after a restart of the Service /etc/init.d/apache2 restart

If this file is not present and is not respected after creation just put the lines in /etc/apache2/apache2.conf

A better way may be the use of a virtual host, so you get rid of the /mywiki/ addition to the URL. So it looks like http://example.com instead of http://example.com/mywiki

-- RalfMoerler 2008-05-16 07:07:30

Enable RSS feed for RecentChanges

I have converted a Wiki from an ancient (pre 1.0) version to the latest one. It seems to work fine, but I don't get an RSS feed for the RecentChanges. Do I need to explicitly enable anything for this to work? -- twm 2009-07-10 13:30:04

To answer my own question:

The rss feed is only available if the pyXML package is installed. No additional configuration is required. -- twm

No CSS on standalone wiki on lighttpd

I've followed the guide FastCGI to the letter, but I get no CSS while it still find the themes. How do I make the server find the htdocs directory?

  • You need to add an alias like this in your lighttpd.conf
      $HTTP["host"] == "localhost" {
            alias.url += (
                    "/wiki/" => "/the/path/to/htdocs/"
            )
      }

www.example.com/cgi-bin/moin.cgi/ vs. www.example.com/cgi-bin/moin.cgi

When I view www.example.com/cgi-bin/moin.cgi/ in my Browser everything works fine. But when I omit the last slash (i.e. www.example.com/cgi-bin/moin.cgi) I don't start on my page_front_page and MoinMoin complains that the page cgi-bin/moin.cgi does not exist yet. What did I do wrong? What info do you need to help?

Is it possible that there is an extra slash in the apache conf corresponding to the following line from HelpOnInstalling/ApacheOnLinux?

ScriptAlias /mywiki /usr/local/share/moin/mywiki/cgi-bin/moin.cgi

2009-05-09 07:07:30

cgiwrap gives ugly URLs, can it be fixed?

I am on a host that requires using cgiwrap so moin.cgi runs as my userid, saving the caches and pages so they can be edited by that same userid (I can't edit pages saved by the httpd user). My wiki URLs look like this: http://www.scons.org/cgi-sys/cgiwrap/scons/moin.cgi/FrontPage.

I have no trouble using mod_rewrite in my .htaccess to rewrite /wiki/FrontPage to the above ugly URL, but the links in the wiki pages all still have that long ugly form (I guess moin.cgi is looking at its own URL and using that as the base for the links). Is there a way in the config file or by changing the code to have the wiki links use my /wiki/FooPage syntax? -- GaryOberbrunner

Try editing your CGI script (moin.cgi) so that the properties in the Config class are as follows:

properties = {'script_name': '/wiki/'}

This should tell MoinMoin to use something else for constructing URLs. -- PaulBoddie

Problems with permissions? (WinXP SP2, Apache2.2.2, Moin1.5.3)

I've just installed the latest version of Moin-1.5.3 on a WinXP machine (SP2) running a fresh installation of Apache2.2.2. I appear to be getting the following problem reported in Apache's error.log file:

[error] [client 140.79.20.85] client denied by server configuration: C:/Server/Moin/mywiki/moin.cgi

When checking moin.cgi (by saving as test_moin.py and running in Python IDE) the following error results:

Traceback (most recent call last):
  File "C:\Program Files\Python24\Lib\site-packages\MoinMoin\request.py", line 1372, in __init__
    msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
  IOError: [Errno 9] Bad file descriptor

Just wondering if anyone has come across this error before, it appears that there might be a permissions clash, however the installation/setup.py has ensured that all created directories are read-only. I've attempted to change these, however they return to read-only after the change is "complete" - what Moin directories/files specifically require read/write access?

I've also checked all paths etc and everything looks about right to me... can someone help here?

I do think this is mainly caused by your apache configuration. Have you read http://www.raditha.com/blog/archives/000896.html. Please provide your apache config file if this does not help. -- MichaelRau 2006-05-04 18:10:42

Thanks Michael, from your link below it appears that the configuration file (httpd.conf) of the Apache 2.2 (2.2.2) install might be the problem here... You've indicated that the additional security in this updated release might be the conflict (which causes the document root for the virtual host to become inaccessible)... Can you clarify your resolution for me however... you suggest commenting out the access configuration stuff (what exactly are you referring too here?), or a better solution, to add "Order deny,allow Deny from all" to the virtual host block... Sorry to be a dum dum here, but can you explicitly outline what you suggest here? I am able to browse the default file in the htdocs directory, just not the (mywiki) sub directory... -- Thanks Paul 2006-05-04 07:30:56

I have not seen your httpd.conf file (read http://httpd.apache.org/docs/2.0/configuring.html). But I think, that the order directive is wrong (read http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). Here are the important directives in my httpd.conf file.

AddHandler cgi-script .py

<Directory "%root%/home">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

# ==============================================================================
# MoinMoin wiki
# ==============================================================================

Alias       /wiki/     "%root%/Python24/share/moin/htdocs/"
ScriptAlias /emnosWiki    "%root%/home/Moin/emnosWiki/moin.cgi"

<Directory  "%root%/home/Moin/emnosWiki/">
    AllowOverride All
    Allow From All
    Options +ExecCGI
</Directory>

-- MichaelRau 2006-05-04 21:32:41

It appears after completing the suggestions above to the Apache conf file, the error is now a (500 Internal Server error) with the error log indicating:

[error] [client 140.79.20.85] (OS 2)The system cannot find the file specified.  : couldn't create child process: 720002: moin.cgi
[error] [client 140.79.20.85] (OS 2)The system cannot find the file specified.  : couldn't spawn child process: C:/Server/Moin/mywiki/moin.cgi

Any more suggestions? I think/hope it's getting closer... -- Paul 2006-05-08 03:30:56

Thanks for the clarification here Michael, it was indeed my shebang statement in the moin.cgi file. As Python sets itself in the system path during install "#!python" does indeed work. I've now managed to hit another "permissions" error, this time the Apache error.log file reports:

[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/common/js/common.js, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/modern/css/common.css, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/modern/css/screen.css, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/modern/css/print.css, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/modern/css/projection.css, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] client denied by server configuration: C:/Program Files/Python24/share/moin/htdocs/common/moinmoin.png, referer: http://bs4x51s-hf/mywiki/
[error] [client 140.79.20.85] sys:1: DeprecationWarning: Non-ASCII character '\\xfc' in file C:/Server/Moin/mywiki/moin.cgi on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details\r

The default wiki page is viewable, however the stylesheets and icons are not accessible, and consequently, the page looks a little more chaotic than it should...

Michael I've made incorrect assumptions before, so (instead of guessing) I'm wondering if you can shed some light on this error, and possibly help me on the way to a shiny new fully-functioning wiki 1.5.3 :)

-- Paul 2006-05-09 23:47:41

Maybe I'm starting to learn something here...

Additional to the Moin directory C:/Server/Moin/mywiki the htdocs dir C:/Program Files/Python24/share/moin/htdocs/ also needs it's directives changed (like below, appended to the end of the httpd.conf file):

# MoinMoin installation 13.21 9/5/2006
# Following values appended to the default Apache httpd.conf file
Alias           /wiki/          "C:/Program Files/Python24/share/moin/htdocs/"
ScriptAlias     /mywiki         "C:/Server/Moin/mywiki/moin.cgi"

<Directory "C:/Server/Moin/mywiki/">
  AllowOverride All
  Allow From All
  Options +ExecCGI
</Directory>

<Directory "C:/Program Files/Python24/share/moin/htdocs/">
  AllowOverride All
  Allow From All
  Options +ExecCGI
</Directory>

Mike, are there any dramas with giving this level of access to both directories?

Thanks for all your assistance -- Paul 2006-05-09 03:25:41

Upgrade from Desktop edition to standard edition with Apache and retain URLs

Running Desktop edition (with Python installed) for a year. Love it. Want to upgrade to Apache for improved performance. (Vanilla CGI will be plenty; don't need mod_python or fastcgi.) However, following the standard instructions to install MoinMoin under Apache results in different URLs for all the pages, which would break all bookmarks.

Desktop edition looks as though the server is dedicated to that application, at least on the chosen port. So

goes directly to FrontPage, as desired. And a typical page in the wiki is at

When I install under Apache, I seem to need to identify the name of the wiki in the URL all the time. (I've done this as an experiment, not yet on the live system.) So now

goes to the Apache webroot/index.html rather than to the wiki. To get to the front page of the wiki, I need

and internal pages are like

That is, the "mywiki/" element needs to appear in every URL. Lots of users have stored bookmarks without the wikiname in them, and I would like not to break them all. How do I setup Aliases or VirtualHosts or whatever in Apache to get the same behavior as the old Desktop edition?

Help, please. Thanks in advance. -- RickLandau 2007-05-11 13:35:33

Use a virtual host on apache, so you get rid of the appendix to the URL. I read in some places that using mod_rewrite and .htaccess is the solution but the apache site recommends using virtual hosts instead of .htaccess rewrites because this causes additional server usage by querying the directories for the .htaccess files.

Here's a sample that works for me on our Intranet. (Replace the <variables> with your values)

NameVirtualHost <IP-Adress>:<Port>
<VirtualHost <IP-Adress>:<Port>>
        ServerName <mysystem.example.com>
        ServerAdmin <YourMailAdressHere>

        Alias /wiki /usr/share/moin/htdocs
        ScriptAlias / </your/wiki/cgi-bin/>moin.cgi/

        ErrorLog </var/log/apache2/wiki_error.log>
        LogLevel warn

        CustomLog </var/log/apache2/wiki_access.log combined>

        ServerSignature On
</VirtualHost>

Also take a look at the http://httpd.apache.org/docs/ Apache documentation for your Version.

-- RalfMoerler 2008-05-16 07:07:30

Desktop Wiki on a Memory Stick

Is it advisable to store the whole installation directory of the Desktop Edition on a memory stick? I would like to have it portable and since those sticks are now large enough, that sounds like a good idea. But what about writing cycles? Can I/should I maybe disable caching?

  • yes, you could put DE on a stick, works fine. Do you speak on caching for the wiki or for the stick? -- ReimarBauer 2006-01-08 13:59:22

    • Caching for the wiki. I was thinking about limiting the storage space required. Since I don't know how moinmoin works, I am concerned about the limited number of writing cycles of those media. It might write something to the same area of the stick over and over again and killing it within a few weeks by doing that.

btw. better you add next time questions at the end of this text. -- ReimarBauer 2006-01-08 13:59:22

  • I thought adding it in front was what was expected since it says "Add your new questions here" there. I have just added "(at the end)"

AMD64 Version?

Is there a version of MoinMoin which will run on an AMD64 computer running Fedora Core 4? Thanks!

  • Do you mean that you're looking for an RPM? Otherwise, try installing the tarball using the instructions on this site. For "standalone" mode, it's fairly easy on any OS including Linux. -- TomPurl 2009-07-10 13:30:04

Thanks! I've got it up and running. I was pretty sure that it would work, but I'm really short of time and thought that I had better be proactive in posting a question.

Another way for Root Wiki?

I use mod python and the following Apache setup allow me to do root wiki without moinmodpy

    RewriteEngine On
    RewriteLogLevel 0
    RewriteRule ^/robots.txt    -               [last]
    RewriteRule ^/wiki/         -               [last]
    RewriteRule ^/images/       -               [last]
    RewriteRule ^/cgi-bin/      -               [last]
    # User Dir
    RewriteRule ^/~(.*)         -               [last]
    # Root Wiki
    RewriteRule ^/?(.*)         /mywiki/$1      [last]

   <Files mywiki>
      # Use mod_python as handler
      SetHandler python-program

      # set the path to the MoinMoin package and to the moin_config.py
      #  PythonPath "['/path/to/moin/lib/python','/path/to/moin/config']+sys.path"
      PythonPath "['/var/www/localhost/mywiki']+sys.path"

      # choose the ModPy Request class as handler
      PythonHandler MoinMoin.request::RequestModPy.run
 </Files>

It seems to work fine for me now. Is there any problem or limitation with using this method?

  • What do you mean by "without moinmodpy"?

Cannot get themes to work

My default install of MoinMoin has no theme. Everything that would normally be in a sidebar or along the top just appears as plain-looking text. Menu items are in a bulleted list. My install must be screwed up somehow (file locations or permissions) but so far I've not been able to find the problem.

Some details:

  • Running SuSE linux version 9 on an x86
  • Installed MoinMoin to the directory /srv/www/MoinMoin

  • moin.cgi contains the following paths:
    • sys.path.insert(0, '/home/USERNAME/WikiData/WIKINAME')
    • sys.path.insert(0, '/srv/www/MoinMoin/lib/python2.3/site-packages')
  • My user profile page lists the three standard themes (classic, modern, and rightsidebar) but no matter which one I choose things still look ugly.
  • All the features seem to work fine, just the formatting is messed up.

Can someone offer suggestions on how to troubleshoot this?

Thanks! --SteveDavison

Obviously your /wiki (?) url_prefix doesn't work or your apache alias configuration doesn't match the moin url_prefix configuration. You can try this without moin by accessing http://server/wiki/modern/css/screen.css (it should show some css source code in that case). -- ThomasWaldmann 2006-01-19 08:34:00

  • --> Solution:
    Went through all the installation instructions again... I had missed the step to set up an alias in Apache that points to the moin htdocs... Once I added this, everything worked beautifully. (I think in this case, "/srv/www/MoinMoin/" is what is referred to as my MoinMoin "prefix"?)

    • Alias /wiki/ /srv/www/MoinMoin/share/moin/htdocs/

Problems starting moin (initial install)

Q1. I am trying to create a standalone moinmoin wiki on a linode running debian and apache. I have python 2.3 and 2.4. I am using 2.4 for this installation.

I installed to /var/www/moin_python2.4/ in /var/www/moin_python2.4/ the folders are bin, lib, share, test_wiki.

In /var/www/moin_python2.4/share/moin/config/ there is a wikiconfig.py file and also in /var/www/moin_python2.4/share/moin/test_wiki there is a wikiconfig.py file.

I am not sure which I should modify and i am supposed to move the moin.py to the place where wikiconfig.py is but there are two wikiconfig.py locations so which should I move it to? Where should I copy the moin.py file from and what changes to I need to make to it? Also do I need to save it to /usr/bin/env or somewhere?

Q2. I am trying to create a standalone moinmoin wiki on a linux machine running debian. Following the instructions on http://wiki.debian.org/HelpOnInstalling/BasicInstallation, i did a 'python setup.py install --prefix=$HOME/PersonalWiki/MoinMoin'. Then I followed the instructions here to create an instance of the wiki. Then I followed the instruction here on copying moin.py to this directory and inserting the required paths. When I run moin.py I get the following

Usage: moin [command] [general options] command subcommand [specific options]
...
FATAL ERROR: You must specify a command module and name:
...
  • Then I tried running 'python moin.py server standalone'. It gives

....
File "/home/ganesh/PersonalWiki/MoinMoin/lib/python2.5/site-packages/MoinMoin/server/__init__.py", line 70, in __init__ . "setting and permissions." % self.docs)

RuntimeError: Can't access docs directory '/usr/share/moin/htdocs'. Check docs setting and permissions.

I tried changing the Defaults in the Config class, it wouldn't work !

A: If you want a standalone wiki, just download the current MoinMoin release, uncompress it, run ./wikiserver.py and you're done.

Changing the URL

I am using the standalone setup and I want the entire wiki to have a base url, eg http://my.machine.net/foo/FrontPage rather then the current http://my.machine.net/FrontPage.

Is this possible? If so, how?

Updating from 1.0 to 1.3.5/1.5.0

We are running a MoinMoin-Wiki at Version 1.0. Now we plan to upgrade the Wiki to the current release, but I've noticed some basic changes (pathes, encoding). Is there an existing script for migrating old data to the new format?

  • Get the archive of the new version you want to use (e.g. latest release), read docs/CHANGES starting from the version you use. You will find a pointer to README.migration which answers your question.

After installing 1.5.1 over 1.5.0 the subscription is gone

There is no menu entry for "subscription" and also the subscribed pages from the UserPreferences are gone. I did just an "emerge =moinmoin-1.5.1 && /etc/init.d/apache2 reload". Any hint? -- -- TobiasPolzin 2006-01-30 20:17:40

  • Is mail right configured, do check if mail_from in your configuration wikiconfig.py is right used -- ReimarBauer 2006-01-30 20:27:10

    • Thanks! Yes, Moinmoin 1.5.0 did not care, but 1.5.1 does. -- TobiasPolzin 2006-01-30 21:07:48

How to install a moinmoin wiki farm

(No, the existing documentation doesn't help.)

Q: I am not sure I completely understand the technical concept and working of a wikifarm (though I know I would like to have one :) Is the main idea to have different URL aliases always pointing to/executing .../myfarm/moin.cgi which then invokes farmconfig.py to match the url and execute specific wiki configuration?

A: Exactly.

Q: I've got the basic part working: every request like '.../myfarm/wikiOne/FrontPage' maps to .../myfarm/moin.cgi which invokes farmconfig.py, matches the url against regular expressions and loads the FrontPage from the correct data directory (different title pages, easy to recognise for testing). Then I have a problem: all the system generated links (such as RecentChanges or Edit(Text), etc) displayed on the FrontPage point to .../myfarm/moin.cgi/some_page (like .../myfarm/moin.cgi/RecentChanges). The 'wikiOne' - wiki name in the url - is missing. What have I missed in configuring the farm? I am doing this on IIS and if I make it work, I will describe the procedure here in more detail.

A: Your initial assumption is wrong. For each member of your farm, you need to point to its own moin.cgi (however they will all be identical), i.e. '.../myfarm/wikiOne/FrontPage' maps to .../myfarm/wikiOne/moin.cgi. Then use entries like

  •     ("wikione",    r".*wikiOne.*$"), 

in jour wiki list in farmconfig.py and put individual config in wikione.py etc.

Here's how to do it on IIS:

  • create virtual directory wikiOne with:
    • local path something like D:\WEBServer\Homepage\moin\wikione
    • check "read access"
    • define application wikiOne with
      • extension .cgi, executable "D:\Python23\python.exe" -u %s %s, check "script engine" only

      • exec permission "script only"
    • enable default document and put "Default.htm" to the top position, do not have moin.cgi in the list
    • enable anonymous access for user IUSR_<name_of_server>

    • reset "Custom Errors" message type 404 to "Default"
  • restart IIS
  • test it with http:/your_server/wikiOne/moi.cgi

Do not bother to remove the moin.cgi from URLs - there are ways to do this partially with some redirection and patches but none of them will be satisfactory - you will always end up with the long URL in the end. If you don't want that, use Apache.

How to move a wiki instance from one machine to another

Install moin as described in the help. When the help tell you to copy the data directory from /usr/share/moin/, copy instead the data directory from your wiki directory on the other machine. Copy also your config files and update the paths if needed.

Installation via FTP

Is there a way to have Moin installed on a server that you don't have shell access to, and you can't change any Python files?

See HelpOnInstalling/ApacheOnLinuxFtp

IIS questions

Python Path

I cannot get python to recognize Moin. I have edited the moin.cgi under the instance and added sys.path.insert (0, c:\moin\lib\site-packages') but it does not seem to help. If I try the python import test, I get the error. Any help would be appreciated.....I am running windows 2003 sp1

IIS6 and 403 Forbidden error

I just installed Moin 1.3.4 on an Windows 2k3 server running IIS6. I installed Python 2.3.5. When I try to access my new wiki, I get "error 403 Forbidden...not authorized".

Please look into your server error log.

Performance

CGI gate is quite slow. There is an MoinMoin ISAPI to invoke wiki from under IIS. And its quite easier to config than CGI gate. Note that this is only tested through version 1.3.5 of Moin. Later releases are said to have issues with the ISAPI.

General setup

Q: I am getting the error "The specified CGI application misbehaved by not returning a complete set of HTTP headers." There is a note below regarding Python versions, but my versions match the install instructions so I don't think that's it. I'm using Win2k3 Server, IIS, Python 2.3.2, Moin 1.2.2.

Also, when I try to add the Application Extension Mapping, I append the -u %s %s to the executable line, but the dialog complains unless I enclose them in quotes. Could this be the problem? My executable line looks like this:

c:\python23\python.exe -u "%s" "%s"

A:In addition for Windows installations there are two levels of security permission checking - one at the IIS level and other at the file system level. So make sure that

  1. You have enable write permissions on your xyzwiki virtual directory in the IIS admin tool (off by default in IIS 6.0).
  2. You enable anonymous access in the directory security tab (Anonymous access and authentication control -> Edit)

  3. You give write permissions to the Anonymous internet user (IUSR_YOURMACHINENAME) for the xyzwiki folder on your filesystem (right click -> sharing and security -> Add user and give the above user write permissions as well)

A: I had this problem.To get it working I did the following:

  • The executable line I use (which works) looks like this:

"C:\python23\python.exe" -u %s %s
  • The moin installation wasn't correctly included on my PythonPath. To see if this is a problem try running the following:

> C:\python23\python.exe
>>> import MoinMoin

If that raises an exception, you need to check the PythonPath is correctly configured. It worked after I ensured C:\moin\Lib\site-packages was on the PythonPath. PYTHONPATH is a key in the System Environment Variables found by right-clicking My Computer and going to the advanced tab.

A: The same CGI error occures if you forget to set the path to wikiconfig.py in moin.cgi. I did.

A: This CGI error can also occur on a IIS-based Moin installation when the IIS engine somehow loses the ability to spawn Python CGI processes correctly. Watch the Task Manager for python processes as you quickly refresh the Wiki. If IIS is spawning the process correctly, you should see a python process appear for each successive page request. If it is not, you will see IIS attempt to double the memory for an existing python process and then return the "misbehaved" error. To fix this, reboot the machine--a simple iisreset does not seem to help.

Q: I have tried all the above suggestions. It still does not work. I am trying to install on IIS 6.0 windows server 2003, python 2.5.1, moinmoin 1.6.1. I followed all the instructions carefully. I have given all the permissions in the answers above also. I tried the above suggestion_ IIS is correctly spawning python cgi processes as I can see python processes as i refresh the browser. I don't know what's wrong. But, I had this message "Environment variables in file names will not be expanded" when I tried to create python cgi the web service extensions on IIS with the following values_

extension name : python cgi Files required: D:\python25\python.exe -u "%s" "%s"

Can this be the problem cause?

A: I resolved this CGI error on Windows Server 2003 by changing the line

logging.info("logging initialized")

in moin\Lib\site-packages\MoinMoin\server\__init__.py in moin 1.6.1. This line caused the line "logging initialized" to be printed before any header information and thus causing the above error message. I changed the line to

#logging.info("logging initialized")

and got my first wiki page served.

A: I (foxhop) also had this error after editing the wikiconfig.py file. It seems I pasted in some bad text that corrupted the file. After deleting the text the error went away...

Removing moin.cgi from the address

I've installed MoinMoin on an IIS server and notice that it seems necessary to always specify /moin.cgi/ in the URL to get it to work, whereas on this wiki and some others, I don't see that. Is there a configuration setting to get IIS to work this way, too?

That question is quite IIS specific. You should ask people that know more about IIS in order to get an answer. I am sure that IIS allows such aliases.

Could you tell me how it's done on any other server and maybe that'll be the clue I need to know what to search for to figure it out?

In Apache for example, you have to set two Aliases: one that maps /wiki to the static htdocs files and another one too map / to the CGI file of MoinMoin. See HelpOnInstalling about this. Feel free to enhance the documentation after you found out how it works.

A: This is easy in IIS... edit the properties on your virtual directory and go to the documents tab. Put "moin.cgi" in the list of documents and move it to the top. That's it.

  • - no, this does not work (Windows Server 2003, IIS 6.0)

404 error

So my new moinmoin installation shows the initial page beautifully but won't show any non-existing pages. MyStartPage, and any new page I edit in (edit works) just take me to a 404 error when I click on them. Any ideas? I've set R/W access to the virtual directory, and to the /data and /underlay folders, and I've given everyone full access to those directories through Windows. Any ideas?

I got the same problem, is there a chance to solve it? Installed on IIS, Virtual Directory has r/w, and everybode has full access to the moin folder. So how to fix this? Everything works, but I can't create pages, because they are "not" found. I had the error, that to page at all (only "moin.cgi") had been found, this could be fixed by unchecking the option "check for existence of files" (or similiar, translated be me into English) in the IIS.

500 error

Messing with the sandbox on my server - whenever I try and edit a page and save it, i get a 500 internal server error. When I refresh the pages, the changes have been saved, but i can't alleviate the issue. Why is this happening?

Solution

I ran into this also and found the problem was no permissions to edit <mywiki>/data/edit-log. I think this happens if you add IUSR_<computername> to the data folder permissions after you've already edited a page once. I simple removed the edit-log file and let MoinMoin recreate it and all was good. There were error messages complaining about this in the error-log file. --DavidAvraamides

Configuring a wiki at http://example.com/foo/bar/wiki with mod_python

I configured my wiki at http://example.com/foo/bar/wiki using Apache and mod_python. When I access /foo/bar/wiki/FrontPage moin try to access page bar/wiki/FrontPage, instead of accessing page FrontPage.

Solution

This is a limitation of mod_python. MoinMoinBugs/ModPyWikiOnlyOneDirDeep explains the problem and contains a patch to make this possible.

Quota exceeded on Linux ISP while installing - can I remove unwanted languages?

I'm installing on a Linux ISP with Python, CGI, Apache, no admin access. I started as described on HelpOnInstalling/BasicInstallation by downloading, ensuring I had Python, unzipping into a temporary directory, and calling setup.py.

Unfortunately, setup.py provokes an 'out of quota' error from my ISP's system. This appears to happen while copying the pages in wiki/underlay/pages, and is either because I've hit the ISP's limit of 12000 files (I already have lots of other files there), or because I've hit the limit on total size allowed. Is there a quick way to delete languages I don't need, because there are lots of language-variant pages. Removing them will probably solve my problem, but I don't want to have to delete them one at a time by hand.

Also on storage, how much of setup.py is just copying files from a subdirectory where Moin was downloaded to its final location? If I could replace this by moves, it would avoid having two copies of the directories being copied, which would also help my storage.

Solution

See ScriptMarket/RemovingUnwantedLanguages

Processing HTML

I can not seem to get the latest version of MoinMoin configured correctly to process html. After a clean installation of MoinMoin what steps do I need to take to set up processing of HTML?

  • What do you mean by processing it?
    • I to am having this problem. With 1.5.1 I attempt to place the #!format htmldirective at the top of a page and then I place the raw HTML. I expect moinmoin to render the page as HTML as per instructions I saw somewhere but nothing happens. There is mention that the HTML parser is not considered secure and has to be "turned on", but I see no mention of how to do that.

    Where did you have read this?

    you have at first to copy the html.py from ParserMarket into your local wiki data/plugin/parser dir. Then there are two methods to use it one is to use the pragma #format html and the other to use a pasrser call { { {#!html} } } -- ReimarBauer 2006-02-03 21:13:19

setup.py and moin.cgi

I'm trying to install moin-desktop-1.3.4-2.exe and Python-2.3.4.exe. When running python setup.py install, I found there is no setup.py. I can't find also any moin.cgi file.

  • moin-desktop works without installing Python and without running setup.py. That's the whole point of this distribution.

How to Upgrade from 1.3.5 to 1.5.0

The 1.5.0 docs/README.migration files says to just read CHANGES. But docs/CHANGES does not give instructions under the 1.5.0 heading.

HelpOnUpdating describes the updating process.

Installing on Fedora: permission denied & SELinux

When following the install instructions HelpOnInstalling/ApacheOnLinux I get following error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,  root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.0.54 (Fedora) Server at localhost Port 80

Solution

This error is the result of SELinux (Security Enhanced Linux) target policy. To disable SELinux on http requests in Fedora Core (4) click System Settings -> Security Level and on the SELinux tab check the Disable SELinux protection for httpd deamon checkbox in HTTPD service section. This is not the perfect solution and if you care of security you should tweak SELinux file permissions properly. This page describes SELinux and its Apache policies in Fedora.

Q: I am getting the error "The specified CGI application misbehaved by not returning a complete set of HTTP headers." There is a note below regarding Python versions, but my versions match the install instructions so I don't think that's it. I'm using Win2k3 Server, IIS, Python 2.5, Moin 1.5.5a.

Also, when I try to add the Application Extension Mapping, I append the -u %s %s to the executable line, but the dialog complains unless I enclose them in quotes. Could this be the problem?

Installing moinmoin on hosted webserver

Q: My server company says they have version 2.4.3 of Python running, but when I run the pythontest.cgi script provided on this wiki, nothing comes up for python. What gives? Should I go ahead and try installing the wiki?

A: First make sure that you have execute permission enabled on pythontest.cgi. I had the same problem until I realized I (as file owner) could read and write the file, but not execute it. You might have the same problem with moin.cgi.

Installing moinmoin

Q:In a wikifarm installation I am getting: "Configuration Error: data_dir "/usr/local/share/moin/wikifarm/wikis/linuxwiki/data" does not exist, or has incorrect ownerships or permissions. Howevwer, the permissions are correct and set to nobody (The Apache user) and read write execute. The directory does exist but is empty. I use the absolute path in the config file.

Import Error

Q:I followed the instructions on how to install and configure MoinMoin, but when testing the wiki, the server barfs with the following message:

[Tue Dec 19 15:45:33 2006] [error] [client 127.0.0.1] Premature end of script headers: /usr/local/share/moin/mywiki/moin.cgi Traceback (most recent call last):

  • File "/usr/local/share/moin/mywiki/moin.cgi", line 39, in ?
    • from MoinMoin.request import RequestCGI

ImportError: No module named MoinMoin.request

I found the MoinMoin module in the tar distro, but nowhere under the installation directory (/usr/local). Where should the MoinMoin module go?

A: Try installing Python with the developer headers. I've had the same problem and reinstalled Python with the developer headers, after this the import error was gone. You might check if an installer.log exist when you install MoinMoin with the installerlog option. If not, the setup might not have run correctly, ergo Moin will not work.

Q: After installing MoinMoin over FTP and a minor problem with css, the wiki finally runs, but all links on the main page dont work since they reference moin.cgi : e.g. http://www.myserver.de/cgi-bin/moin.cgi/SystemPagesSetup I get that this might have something to do with apache aliases, but thats something I cant configure since its a hosted server. Is there anyway to solve this ? (MoinMoin is 1.5.6 and Python 2.3.4)

Problem when installing on Windows XP with Apache 2.2.4 and Python 2.5

I have both Apache and Python installed and running, and installed MoinMoin as explained in the install.html. Still, I keep getting a "403 - Access denied". I can not even run the diagnosis (...=?action=test)

I have edited the moin.cgi and httpd.conf as indicated.

The error.log of Apache shows "[client 127.0.0.1] client denied by server configuration: C:/moin/mywiki/moin.cgi". If I run Python and do "import moinmoin" it tells me no such module exists. What am I missing?

A: Don't know about the importing part but I solved similar error (same Python and Apache version) by adding access rights for the Wiki installation folders in the httpd.conf file:

...
#
# "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to
# whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

# MoinMoin directory access
<Directory "C:/Python25/share/moin/htdocs/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
<Directory "C:/Moin/mywiki/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
...

Need dictionary file

Q: I'm trying to get the spell checking to work on my OSX install of MoinMoin. However, It appears that I need a dictionary file, as it wasn't installed with the OS (AFAIK). Any idea where one is available? There is reference to one on the page HelpOnSpellCheck, but the link is no longer valid.

A: Look at /usr/share/dict/words. Moin simply needs a plain text file containing a list of words to check against. If you don't find the file on your system, you can try to search the internet by "Wordlist YourLang" and you'll find things like this: http://www.sil.org/linguistics/wordlists/english/. Simply put the file in your wikiinstance/data/dict dir. This should work. Or just look into the contrib/ directory of the moin download archive.

Going crazy trying to upgrade

Hello, I tried to upgrade from 1.5.3 to the current version (was 1.5.7, now is 1.5.8), so I tried to upgrade from 1.5.3 to 1.5.4, 1.5.4 to 1.5.5, etc. I never achieved the first upgrade, so I gave up.
Since then, I reinstall another 1.5.3 MoinMoin Wiki to

  1. have a clone of the first one which handle our internal documentation (i use rsync for this purpose)
  2. try the upgrades on this clone

So, now I have a little time, I just retry the migration on my clone Wiki and another time it fail!

First, I'm lost with the documentation about upgrading. I read and reread the docs/README.migration and I'm still not sure of what I have to do.
Bur it seems that the steps are :

  1. use the migration scripts to convert data
  2. install the new version following the INSTALL.html guide
  3. do the "post 1.5.3 new style migration"

Ok, so for the migration scripts, I can't understand if I need some to migrate from 1.5.3 to 1.5.4, so as in my /usr/lib/python2.4/site-packages/MoinMoin/script/migration I found 1050300.py 1050301.py and 1050400.py, I ran each.

I then install the 1.5.4 version following the guide. I run through the "Basic Installation" and "Wiki Instance Creation".

For the "post 1.5.3 new style migration", I swith to my www-data user, and invoke

moin --config-dir=/opt/wiki-instances/wikiname --wiki-url=wiki.domain.tld migration data

and I have an error everytime

MoinMoin.error.ConfigurationError:
data_dir "../data" does not exists, or has incorrect ownership or
permissions.

In my wikiconfig.py, I have

data_dir = '../data/'
data_underlay_dir = '../underlay/'

(I'm under Debian, and after the installation, it was the only way to have MoinMoin running)

What can I do?
Is my migration method correct?
Can anyone help me?

-- EricVeirasGalisson 2007-06-04 15:17:16

  • (!) Using relative pathes is asking for trouble. And you obviously got trouble.

Ok, I put some absolute paths in my wikiconfig.py and got

Calling migration script for /opt/wiki-instances/wikiname/data, base revision 1050400
Final mig script reached, migration is complete.

I think my migration is complete now, and I can do the same for the following versions. But, does it means that the migration scripts are called by the moin executable or do I need to call them before ? Thanks -- EricVeirasGalisson 2007-06-05 08:28:24

  • The pre-1.5.3 mig scripts are called manually (and you also have to remember / determine) which you have already run before and which not. Don't run them twice. The post-1.5.3 mig scripts are called automatically by just using the "moin" command (see README.migration). It will automatically determine the script to start with, depending on some version metadata in your data_dir, and run all scripts needed to upgrade to the current version - unless otherwise noted.

    • Hum... the problem is: the README.migration is not very clear (reverse order and so on...), so does it mean that if I'm running a version >= 1.5.3, I don't need to run any migration scripts manually?
      So, in this case, the migration procedure is

      • install the new version following the INSTALL.html guide
      • do the "post 1.5.3 new style migration"
        • isn't it?

error: package directory 'MoinMoin' does not exist

Q: I installed Python (Python 2.5.1) on a win2k system. I downloaded MoinMoi version 1.5.8 and untarred it. When I run the folowing command in the command prompt

C:\Moin\moin-1.5.8\setup.py --quiet install --prefix="C:\moin" --record=install.log

I get the following error:

error: package directory 'MoinMoin' does not exist

Any feedback would be appreciated

A: To answer my own question: Navigate to the script directory (c:\moin\moin-1.5.8\ in this case) before executing the script.

Embed external non-wiki page

Q: Is it possible somehow to embed an external (non-wiki)page into a MoinMoin page? We have a process monitoring application running with a user interface through JSP. It would be handy if we could embed it in the wiki pages. Maybe in some kind of frame?

Problems installing (Windows XP SP2, Apache 2.2.2, Python 2.5.1)

I'm attempting to upgrade an existing Wiki (Apache 2.2.2, Python 2.4.3, Moin 1.5.4) an in the process also updating Python to the latest release (2.5.1). I removed the previous Python installation and upgraded to 2.5.1 (which now sits in C:/Program Files/Python25) and then proceeded to install the latest release of Moin 1.5.8. Installation appeared to work fine, and I have adjusted the shebang and path-dependent info in moin.cgi, as well as path dependent info in http.conf. When called locally on the commandline, moin.cgi works without reporting any errors, however when I try and call this locally through a browser, I receive the following error:

[Thu Sep 13 11:48:26 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified.  : couldn't create child process: 720002: moin.cgi
[Thu Sep 13 11:48:26 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified.  : couldn't spawn child process: C:/Server/Moin/mywiki/moin.cgi

I've attempted to include changes to the directory access rights, as specified in the post above (Problem when installing on Windows XP with Apache 2.2.4 and Python 2.5) however this doesn't appear to have solved the problem..

Does anyone have any tips for me here?

-- Thanks Paul 2007-09-13 11:53:03


  • I have just installed the latest version of Moin-1.5.8 on a WinXP machine (SP2) running a fresh installation of Apache2.2. I appear to be getting a problem with permissions. I had the following problem reported in Apache's error.log file, although I followed the same steps as in http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheOnWin32

[error] [client 127.0.0.1] client denied by server configuration: C:/Moin/mywiki/moin.cgi

Any help will be greatly appreciated.

Thanks a lot.


  • I just upgraded to Mac OS X 10.5 (Leopard) from 10.4. I had my wiki working very nicely for about a year. The upgrade to Leopard messed up all my web sites because it changed the version of apache and the location of the config files. I successfully changed the apache config file to get my web sites working, and added the alias lines for the wiki (I entered the identical lines from the previous version of the config file). However, now I get a '403 Forbidden' message when I try to access my wiki. I've checked and the wiki is still owned by www (the web server). The permissions don't seem to have changed and I don't see why the upgrade Leopard would affect them. I'm wondering if there is something else I've forgotten in the config file.

Any suggestions would be welcome.

Thanks


  • upgrade question from moin-1.5.5 to the latest stable version 1.5.8

can anyone please give me some tips? or point me to an how-to upgrade procedure? does anyone know about problems with upgrades from this versions?

thank you.


Migration from 1.3.3 to 1.5.8

Hello,

I'm trying to upgrade a wiki from 1.3.3 to 1.5.8, and the following part of the README.migration confuses me:

1.5.3 migration
===============

First make sure you have run all the old mig scripts ONCE (and only once) on
your data dirs.

The old style stuff moved here: MoinMoin/script/old/migration/

In that directory, there is also a new 152_to_1050300.py mig script - you
need to run it as the last mig script to switch to new style mig scripts.
It puts a file "meta" in your data dirs that hold the data_format_revision
value. The new style mig scripts use that value to make it much simpler for
you in future.

After this, please continue in section "Post 1.5.3 new style migration".

1.3.4/1.3.5 migration
=====================
We added some mig scripts in moin 1.3.4. So if you have done the 1.2 to 1.3
migration with some earlier moin version (like 1.3.3), then please run the
new scripts, too:
 * 12_to_13_mig10.py
 * 12_to_13_mig11.py

the 12_to_13_mig11.py says:

migration from moin 1.2 to moin 1.3

12_to_13_mig10.py:

migration from moin 1.3 < patch-xxx to moin 1.3 >= patch-xxx

and 152_to_1050300.py

Migration from moin 1.5.2 to moin 1.5.3

Can you please tell me, where the 1.3.xxx -> 1.5.2 part is?

  • There is nothing else except what is described in the README.migration (if we don't change storage between some versions, you don't need a converter script for migrating between those). So, assuming that you correctly migrated to 1.3.3 earlier (and have run everything up to mig9), you need to run mig10, mig11, 152_to_1050300 now and the the post-1.5.3 stuff.

Using MoinMoin on smartphone (symbian) via Raccoon

Q: There is apache available for Symbian called Raccoon, mod_python is working there. Is it worth an attempt to install MoinMoinWiki on phones having Raccoon installed?

A: I guess it would be too slow. If you have Python on the phone (it won't work without), you can also use the standalone server of moin (will eat less resources, but still be too slow).

Migration from 1.5.7 to 1.6.0

What do I need to do to convert my data pages to the 1.6.0 syntax? I've read the README.migration and still don't understand what needs to be done. I've located some migration scripts but need a little direction on how to use them.

  • In a farm each wiki in the farm has to be migrated separately. The migration requires that you run the migration command twice (which was not obvious for me initially). After running the "migration data" cmd once a file "rename1.txt" is created in the data folder. This file may be changed. Either the modified or the unmodified file "rename1.txt" must be stored under the name "rename2.txt" at the same place. Then the migration command has to be run again. This starts main migration to the new markup. A back-up containing the unconverted data (wiki-pages) is created during the main migration in a folder named "data.pre160". Note that older versions of the pages are not converted - so if an older version is viewed in a moin-1.6 wiki the rendering is broken.
    1. Change your config files and server configuration as required (diff 1.5.7 against the new files coming with 1.6.0)
    2. Run (make sure that moin.py is on your path or add the path)
      • moin.py --config-dir=pathToWikiConfig --wiki-url=http://yourwiki/ migration data

    3. Create the rename2.txt file

    4. Start main migration (this creates a new 1.6 version for each page that is converted)
      • moin.py --config-dir=pathToWikiConfig --wiki-url=http://yourwiki/ migration data

      • If the main migration fails you should first fix the problem and then start again: Delete the data-folder that is created during the migration and rename the backup folder from "data.pre160" to "data". Then re-run the migration command.

Thanks very much! This worked nicely.

manual update to 1.6.0

Hi guys, Im trying to update from 1.5.8 to 1.6.0 atm but run into a small problem. Im using apache2 with fastcgi and python2.5 on a debian system. When I manually upload all files to python2.5/site-packages/MoinMoin, the new/changed ones arent recognized, its still showing up as 1.5.8 (so the update script doesnt even think theres something to update). An Apache restart/stop+start doesnt work, any other way to tell python that there are new files? (would like to prevent a full server restart if possible)

  • you have to check your moin.fcg it needs changes do compare it with the example from the server dir.

Permission denied when trying to migrate data

Trying to upgrade from 1.5.8 to 1.6.1. When running moin.py --config-dir="D:\WikiFarm" --wiki-url=farm1.site.ru/ migration data I get the following traceback:

145852 INFO     logging initialized
Traceback (most recent call last):
  File "D:\Moin\_install\moin-1.6.1\moin.py", line 138, in <module> run(Config)
  File "D:\Moin\_install\moin-1.6.1\MoinMoin\server\server_standalone.py", line 584, in run httpd = makeServer(config)
  File "D:\Moin\_install\moin-1.6.1\MoinMoin\server\server_standalone.py", line 526, in makeServer return serverClass(config)
  File "D:\Moin\_install\moin-1.6.1\MoinMoin\server\server_standalone.py", line 176, in __init__ SimpleServer.__init__(self, config)
  File "D:\Moin\_install\moin-1.6.1\MoinMoin\server\server_standalone.py", line 63, in __init__ BaseHTTPServer.HTTPServer.__init__(self, address, MoinRequestHandler)
  File "C:\Python25\lib\SocketServer.py", line 330, in __init__ self.server_bind()
  File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind SocketServer.TCPServer.server_bind(self)
  File "C:\Python25\lib\SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.error: (10013, 'Permission denied')

IIS 6.0 and Python 2.5.1.

  • /!\ This is the wrong moin.py (the standalone server). You need MoinMoin/script/moin.py.

    • Thanks, dealt with this, but another problem:

File "D:\moin\Lib\site-packages\MoinMoin\script\migration\migutil.py", line 50, in listdir
    names = [name for name in os.listdir(path)
WindowsError: [Error 3] : 'd:\\WikiFarm\\wiki\\data\\user/*.*'

It seems like the script is looking for a user dir in each farm wiki's data dir, while I have a single user dir for all wikis which I specified in farmconfig.py

  • (!) giving it an empty user dir should make that simple program happy.

Problems Moving Moin to another server

After moving my wiki instance to another server, I copied my /data folder onto the server and immediately started getting the following error on MyStartupPage and all other header links:

"WindowsError[Error 183] Cannot create a file when that file already exists"

I discovered that deleting the /data/cache/ folder fixed the issue. Moin immedatiately recreates the /cache folder os it did not cause any issues. Using the maint cleancache may also work, but I had a lot of troubles getting it to run on the server.

It´s not that easy getting a standalone to work

I´m running a Suse 10.2 and installed Python 2.5 and the 1.6.1 moin². Calling up "python moin.py" gives the goo news below, but starting "http://localhost:8080" is not all it takes as the quick manual says.

This is what I get:

localhost:~/moin-1.6.1 # python moin.py Loading ... MoinMoin - 1.6.1 [release]

222501 INFO logging initialized 222501 INFO Serving on localhost:8080 222501 INFO Running as uid/gid 1000/100 222708 INFO 127.0.0.1 "GET / HTTP/1.1" 500 -

==> here the trouble after calling the localhost in firefox


Exception happened during processing of request from ('127.0.0.1', 22951) Traceback (most recent call last):

  • File "/root/moin-1.6.1/MoinMoin/server/server_standalone.py", line 212, in serve_forever_thread File "/usr/lib/python2.5/SocketServer.py", line 254, in finish_request

    File "/root/moin-1.6.1/MoinMoin/server/server_standalone.py", line 281, in init File "/usr/lib/python2.5/SocketServer.py", line 521, in init

    • self.handle()
      • File "/usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
    • self.handle_one_request()
      • File "/usr/lib/python2.5/BaseHTTPServer.py", line 310, in handle_one_request
    • method()
      • File "/root/moin-1.6.1/MoinMoin/server/server_standalone.py", line 306, in do_ALL File "/root/moin-1.6.1/MoinMoin/server/server_standalone.py", line 336, in serve_moin

    File "/root/moin-1.6.1/MoinMoin/request/request_standalone.py", line 56, in init File "/root/moin-1.6.1/MoinMoin/request/init.py", line 1418, in fail

ImportError: cannot import name failure


There´s much more to know, isn´t it ??

(!) Completely erase that stuff, log in as user (not root) and start from scratch.

Problems with basic installation

I am having the worst time trying to install MoinMoin on OSX - I upgraded my computer to Leopard just recently, followed the instructions listed in the Help all to no luck. There are problems, since the most recent version is 1.6.3 - the installer seems to be for 1.6.0 - I tried just changing the numbering appropriately, but cannot find the wiki when I browse to http://localhost/mywiki . Any help would be appreciated - unless I'm missing something on my computer, there is something wrong with the install guide.

  • If you have trouble with the apache installation, why don't you simply use python ./moin.py? That's all you need to do to start the standalone server of 1.6.x and have a working wiki. -- ThomasWaldmann 2008-06-19 20:25:26

Is it possible to change/add themes without access to /wiki/ directory?

I'm working on a wiki at work where I have access to the wikiconfig.py file, but not the /wiki/ directory. The sys admins install everything for our wikis and this is the way they have it set up. Is it possible for me to add or modify themes in this case?

Problem installing with linux + lighttpd + fastcgi + unix socket + site directory (not subdomain).

I'm running a lighttpd server under linux, and I'm trying to get MoinMoin running using fastgci with a unix socket in a site directory as opposed to a subdomain. In other words, I want the URL for getting to MoinMoin to be http://myserver.tld/moin, where the /moin part is the site directory.

However, I can't get this to work. When I go to http://myserver.tld/moin using the configuration described below, I always get a 500 Internal Server error.

Can any of you see what's wrong with my configuration? Here it is:

The directory where the site resides is /home/hippoman/sites/moin, and it contains the following items:

% ls -l
total 13
 2 drwxr-sr-x 7 hippoman www-data 2048 Oct  6 20:14 content/
 2 drwxrwx--- 7 hippoman www-data 2048 Oct  6 17:26 data/
 2 drwxrwx--- 3 hippoman www-data 2048 Oct  6 17:26 underlay/
 7 -rw-rw---- 1 hippoman www-data 6705 Oct  6 20:09 wikiconfig.py

The content subdirectory is a copy of the htdocs directory under /usr/local/share/moin (the place where MoinMoin got installed on my system). In other words, it's the static content.

This is the pertinent part of my lighttpd config file:

  alias.url = (
    # "/moin" => "/home/hippoman/sites/moin/content",
    "/moin" => "/home/hippoman/sites/moin",
  }
  $HTTP["url"] =~ "^/moin\b" {
    url.rewrite-once = (
      "^/moin/robots\.txt" => "/moin/content/robots.txt",
      "^/moin/favicon\.ico" => "/moin/content/favicon.ico",
      "^/moin/(.*)" => "/moin/content/$1",
      "^/moin$" => "/moin/content"
    )
    server.document-root = "/home/hippoman/sites/moin"
    accesslog.filename   = "/home/hippoman/log/moin.access_log"
    fastcgi.server = (
      "/moin" =>
        (( "socket" => "/var/run/lighttpd/hippoman/moin.socket",
           "bin-path" => "/root/bin/smoin",
           "bin-copy-environment" => ( "USER", "LOGNAME", "SHELL" ),
           "bin-environment" => (
             "PATH" => "/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin",
             "UNAME" => "hippoman",
             "GNAME" => "www-data",
           ),
           "min-procs" => 1,
           "max-procs" => 4,
#           "check-local" => "disable",
        ))
    )

I tried it both with and without check-local set, but it fails nonetheless. I also tried it with both versions of the /moin alias, with the same error.

The /root/bin/smoin script is a wrapper which changes the uid and gid:

[HASHBANG]/bin/sh

uname=${UNAME:=www-data}
gname=${GNAME:=www-data}

unset UNAME
unset GNAME

exec /usr/bin/sudo                             \
     /usr/local/bin/chpst -u ${uname}:${gname} \
     /root/bin/local-moin.fcg "$@"

exit 1

... where [HASHBANG] represents #!, which I can't figure out how to escape in the text above using this markup language.

The /root/bin/local-moin.fcg program is my local version of the standard moin.fcg:

... etc. ...

# Debug mode - show detailed error reports
os.environ['MOIN_DEBUG'] = '1'


from MoinMoin.server.server_fastcgi import FastCgiConfig, run

class Config(FastCgiConfig):
    loglevel_file = logging.INFO
    logPath = '/home/hippoman/log/moin.access_log'
    max_requests = 1024
    properties = {}
    # properties = {'script_name': '/moin'} # use this instead of the line above if your wiki runs under "/moin" url

    # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value!
    # backlog = 1

run(Config)

I tried it with both versions of the properties setting.

Can anyone see what I'm doing wrong? Thanks in advance.

PS: The wrapper script works fine. I use one just like it to run other fastcgi engines under specific user ID's. Also, the ownerships and file permissions are all correct, as far as I can tell.

PPS: All other sites work fine under my web server, including all of them running under other fastcgi instances.

PPPS: The only error message that I can find in any log file is this (anonymized):

xxx.xxx.xxx.xxx myserver.tld - [06/Oct/2008:21:51:20 -0400] "GET /moin HTTP/1.1" 500 369 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3"

Just installed MoinMoin v1.8.0 and the GUI editor isn't working

When I try to edit a page on my wiki using the Edit(GUI) button I seem to be missing the editing screen. I can see the Save Changes, Preview, ect buttons at the top of the page and the Comment entry at the bottom of the page but the section to actually edit the page is just blank. Have I missed a config setting somewhere to enable GUI editing? I know it is not the browser as I am able to edit other MoinMoin wiki's using the GUI editor.

I figured this out by accident. As an FYI, in my wikiconfig.py I had my url_prefix set incorrectly.

Guide for MoinMoin on a memory stick?

Has anyone else come up with a guide to installing MoinMoin on a memory stick? I've started one that is centered around Windows, I'm not a Linux or Mac user, at the page PortableMoin. If anyone wants to help categorize it and add information for the other OSes, please feel free.

Robert K, Dec 29 6:39PM GMT

Is there a way to change global variables?

I'd like to change how the variable SIG is being displayed. Is there a way to change it so the name and date are shown on two lines instead on one next to each other?

GUI Editor not installed/configured??

I have created 2 moin wiki instances on ubuntu that both appear to work, except that the GUI Editor doesn't appear. The apache log file shows that the /usr/share/moin/htdocs/applets/FCKEditor/fckeditor.js file is being called up, but doesn't exist. How should this editor be configured? I can see some fckeditor config references in the usr/share/docs/python-moinmoin/examples folder, but no information as to how to use these.

Ubuntu 8.10, MoinMoin 1.7.1

debians package manager has dropped the old fckeditor package. 1.8 uses the current fckeditor version and was refactored last gsoc, see MoonByeongweon/SOC2008. You may want to download a recent version.

After upgrade MoinMoin 1.6 --> 1.81 edit page no more possible

After the upgrade to MoinMoin 1.81, the pages cannot be edited anymore. It always shows "Locked" (mandarin theme), even if I or the Admin is logged in. Also with the classic theme 'edit' does not work.

Any idea what the problem could be?

(!) Please try "modern" or "modernized", whether it works with those.

I found a workaround for the problem. It had to do with the ACL configuration. There was a group defined - but unfortunately, the new MoinMoin version does not work with this group, so I had do enter all users directly into the file wikiconfig.py.

EpGroup (was working with MoinMoin 1.6)

#acl EpGroup:read,write,delete,revert
 * Admin
 * UserOne
 * UserTwo
 * UserThree
 * UserFour

wikiconfig.py (was working with MoinMoin 1.6)

acl_rights_default = u"EpGroup:read,write,delete,revert All:read"

wikiconfig.py (works now also on MoinMoin 1.81)

acl_rights_default = u"EpGroup:read,write,delete,revert \
Admin:read,write,delete,revert \
UserOne:read,write,delete,revert \
UserTwo:read,write,delete,revert \
UserThree:read,write,delete,revert \
UserFour:read,write,delete,revert \
All:read"
GPL

This workaround works find for me, but sure, it would be nice if the groups also worked in the new version.

After upgrade one of the farms fails to import theme module

I've got a farm of two wiki's and tried to upgrade from 1.7.2 to 1.8.4 One of the wiki's works fine, but for the second I get the following error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.5/site-packages/MoinMoin/support/thfcgi.py", line 537, in accept_handler
    req.run()
  File "/usr/lib/python2.5/site-packages/MoinMoin/support/thfcgi.py", line 283, in run
    self._handle_record(rec)
  File "/usr/lib/python2.5/site-packages/MoinMoin/support/thfcgi.py", line 385, in _handle_record
    self._handle_app_record(rec)
  File "/usr/lib/python2.5/site-packages/MoinMoin/support/thfcgi.py", line 456, in _handle_app_record
    self.req_handler(self, self.env, self.getFieldStorage())
  File "/usr/lib/python2.5/site-packages/MoinMoin/server/server_fastcgi.py", line 56, in <lambda>
    request_fcgi.Request(req, env, form, properties=properties).run()
  File "/usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1205, in run
    self.initTheme()
  File "/usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1184, in initTheme
    self.loadTheme(theme_name)
  File "/usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 741, in loadTheme
    Theme = wikiutil.importPlugin(self.cfg, 'theme', theme_name, 'Theme')
  File "/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py", line 1110, in importPlugin
    return importWikiPlugin(cfg, kind, name, function)
  File "/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py", line 1120, in importWikiPlugin
    plugins = wikiPlugins(kind, cfg)
  File "/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py", line 1193, in wikiPlugins
    module = pysupport.importName(modname, kind)
  File "/usr/lib/python2.5/site-packages/MoinMoin/util/pysupport.py", line 81, in importName
    module = __import__(modulename, globals(), {}, [name])
ImportError: No module named p_dd8c12da6c9cca3e1448683a3f9a81deb21bd610

I tried to insert my custom  logging.debug  checks in various places of that files in the trace and discovered that this is an attempt to load a standard theme for this wiki. Another wiki uses the same theme too. After dumping to log from the _loadPluginModule in multiconfig.py I can see that this is the correct UID and it seems like no exceptions occur there. htdocs are updated.

After rolling back python/site-packages/MoinMoin to the previous version everthing is fine again.

.fcg files for both wiki's are the same. Config files differ only in sitename, interwikiname and data_dir. All permissions in both ./data ./underlay ./htdocs are double-checked.

So I'm completely stuck now. Can any one help?

-- AlexanderAgibalov 2009-07-02 13:44:19

Configuration Files

Edit this section

Invalid escape

I´ve done everything as described at http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheOnWin32. When opening http://127.0.0.1/mywiki I get the Message "Import of configuration file "wikiconfig.py" failed because of ValueError: invalid \x escape (...)".

  • Please paste your configuration.

Farmconfig matching

Trying to get farm_config working if anyone has an example I would appeciate it.

  • See .../wiki/config/farmconfig.py - that is an example for a working farmconfig setup

I have been working with that farm config. I've added ("adminwiki", r"^adminwiki/.*$"), to the wikis array in farmconfig.py and I keep getting an error saying:

Could not find a match for url: "adminwiki".

  • Obviously, r"^adminwiki/.*$"does not match "adminwiki". Which URL did you request?

The URL I type in is http://adminwiki, but by the time I see it working, it's http://adminwiki/moin.cgi/. I just now got it to work by changing the match string to: r"^adminwiki$" instead.

Moving several wikis to a wiki farm - (Problem)

Suppose I have two different wikis located under a common base-folder:

  • base/wiki1
  • base/wiki2

Running moin.py in my "base/wiki1"-Directory works fine and gives access to my "wiki1" content. For example, requesting

http://myserver:8080/NewPage

will try to access "NewPage" in my base/wiki1/data/pages directory. But if I try to turn my two different wikis to a single wiki-farm by using farmconfig.py:

#farmconfig.py:
wikis = [
          ("wiki1",  r"^myserver:8080/wiki1/.*$"),
          ("wiki2",  r"^myserver:8080/wiki2/.*$")
        ]

requesting

http://myserver:8080/wiki1/NewPage

will end up accessing "wiki1(2f)NewPage" in my base/wiki1/data/pages directory. Why?

  • I have dealt with a similar issue (I believe). You need to go into MoinMoin Request.init and edit the base request. MoinMoin needs PathInfo and ScriptName to look like so:

PathInfo = "/NewPage..." ScriptName = "/wiki1"

In your case instead I believe they look like this:

PathInfo = "/wiki1/NewPage..." ScriptName = "/"

so you need to put in some code to switch it around so it looks like the former.

  • <!> you should not needed to edit any moinmoin intern files to setup a correct farmwiki. maybe beside the farmwiki.py you have still the wikiconfig.py file in your directory or something else missed... you may also have to check your server configration (e.g. if it's apache with mod-wsgi that your aliases are correct; for example I do for every wiki this stuff in my apache config: WSGIScriptAlias /wikixy /var/www/moinmoin/server/moin.wsgi)

Standalone server - TCP Interfaces

I am trying to make the standalone server accept connections from a limited number of IPs only. To do this I am editing the "interface" field in the moin.py file in the following way "interface = 'some.ip.is.here' ".

  • Check if you are binding to an invalid IP, to an invalid port (check that one as well). Especially, look if you want to bind to a port below 1024 and if you run standalone as a root application.

Have the same problem. Trying to make the standalone server accept connections from a limited number of IPs only. To do this I am editing the "interface" field in the wikiserverconfig.py file in the following way "interface = '192.168.1.51' ". IP address is right. I get next error when trying to launch wikiserver.py: "socket.gaierror (11001, "getaddrinfo failed").

Invalid syntax error after editing wikiconfig.py

  • Import of configuration file "wikiconfig.py" failed because of SyntaxError: invalid syntax (wikiconfig.py, line 123).

Solution

In most cases, you broke the file by adding tab characters. MoinMoin configuration files are Python modules, and does not work with a mix of tabs and spaces. Uses only spaces when you edit moin files.

  • Is there any way to totally disable the quick links at the top of the page? (front page is all I need and that I can get from the logo).
  • is there any way to tailor what appears in the grey footer at the bottom? (I don't want the spellchecker which is there, and I would like the rename-page facility, which is not there).
    • you can simply remove the spellcheck action from action/ directory (or make your own theme to not show it)
    • some actions must be enabled, e.g. allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage',]

Default User Preferences

Is there a way to set the default options for the anonymous user and for all new users?

  • You can set some basic options, see HelpOnConfiguration (this includes the theme default, the question marks in front of the links etc.; in MoinMoin 1.2 and 1.3). A few options cannot be set in a global way, though.

EOL while scanning single-quoted string

  • Import of configuration file "wikiconfig.py" failed because of SyntaxError: EOL while scanning single-quoted string (wikiconfig.py, line ...).Goto line ... and check if you have a backslash at the end of the string. If so, try to avoid it. If it still does not work, paste the line here.

Where is moin_config.py?

moin_config.py was replaced in 1.3 with wikiconfig.py. Please read HelpOnInstalling.

Another port for the DesktopEdition

I can't see an option for changing the port.

Solution

Read the page DesktopEdition/HowToConfigure.

Troubleshooting Configuration

We are having issues with the configuration of MoinMoin. This is the error log. We are setting up a single wiki on the intranet. The farmconfig in moin.cgi is commented out. We have changed the 404 errors as suggested for IIS. We still cannot add NEW PAGES. We are using Moin 1.3.5 Python 2.4.2 and Windows NT. We appreciate your help.

  • It looks like your configuration file is not indented correctly. Please upload it in the wiki if you cannot file the fault by yourself.

Farm with Desktop Edition

You may wonder why would anyone need to run a wikifarm on a DesktopEdition but the truth is that I would like to keep my personal wiki and my work wiki completely separate (work wiki can then be synchronized with a remote server, my personal stuff can stay my own). Can anyone give me a brief outline (provided it is possible to run this with the DesktopEdition on Windows) of how to accomplish this? I am a total newbie with python so instructions as simple as the like of "open eye, insert fork, twist, call 911" would be greatly appreciated. Ivaylo, 2006-02-07

Solution

Solution working for Windows XP SP2 / MoinMoin Desktop Edition 1.5.3
Let's suppose you want to create a farm of 2 wikis: wiki_biz and wiki_perso

Step 1: create a wiki instance for each wiki

  1. Create a copy of C:\Program Files\moin-desktop\wiki\data with all its subfolders at

    1. C:\Program Files\moin-desktop\wiki\data_biz

    2. C:\Program Files\moin-desktop\wiki\data_perso

Step 2: create a config file for each wiki

Save these 2 files and farmconfig.py (step 3) under C:\Program Files\moin-desktop\

wiki_biz.py

# -*- coding: iso-8859-1 -*-

from farmconfig import FarmConfig

class Config(FarmConfig):

    sitename = 'Wiki Biz'
    data_dir = 'C:\Program Files\moin-desktop\wiki\data_biz'

wiki_perso.py

# -*- coding: iso-8859-1 -*-

from farmconfig import FarmConfig

class Config(FarmConfig):

    sitename = 'Wiki Perso'
    data_dir = 'C:\Program Files\moin-desktop\wiki\data_perso'

Step 3: create farmconfig.py

# -*- coding: iso-8859-1 -*-

wikis = [
    ("wiki_biz",  r"^wiki_biz.*$"),
    ("wiki_perso",  r"^wiki_perso.*$"),
]

from MoinMoin.multiconfig import DefaultConfig

class FarmConfig(DefaultConfig):
# put here the config you want to share among all your wikis in the farm. For example:
    tz_offset = 9.0

Step 4: add entries in your hosts file

  • edit the hosts file at C:\WINDOWS\system32\drivers\etc\hosts

  • replace the following line

127.0.0.1       localhost

with

127.0.0.1       localhost wiki_biz wiki_pers

Using the farm

Start the Wiki engine (moin.py)

Now, you should be able to access your 2 wikis by using the following address:

Force User Logout On Browser Close

System: Ubuntu 5.10, latest MoinMoin, Apache, and Python packages. Currently, users that log in remain logged in between browser sessions. Due to the way we will be using this wiki, I'd like to set the cookie so that it expires when the browser closes. I have no idea how to do this. Any suggestions? Thanks, Thane

  • You can use a low cookie_lifetime value, so the cookie expires when there is some time no activity. This has nothing to do with whether the window is open or closed, though. Maybe one could somehow catch window close with javascript and remove the cookie?

How to configure a wiki farm running MoinMoin via Apache with mod_python

I have checked the docs at HelpOnConfiguration, HelpOnInstalling/ApacheWithModPython, and HelpOnInstalling for an answer to this. Of all those pages, the only one that begins to address this question is HelpOnInstalling, which simply states:

  • Create a directory for your farm, and under it, make two data trees per the /WikiInstanceCreation instructions. In the config directory (by default /usr/share/moin/config) you will find an example farmconfig.py file. Copy this into the farm directory, and edit moin's launcher script (moin.py if you are standalone, moin.cgi if you are cgi, etc.) to point directly at it.

This is not explicit enough for me. What particular MoinMoin file do I need to edit for Apache with mod_python, and what specifically do I need to place or alter within that file to point to my farmconfig.py file? Many thanks in advance. -- ChrisLasher 2006-11-09 01:31:23

  • You have to modify sys.path to contain the directory that has your configuration files, so Python can import the config file(s) from there.
    • How about a concrete example? Let's say I have two wikis, WikiA and WikiB. Their files are stored in /home/moin/wikia/ and /home/moin/wikib/, respectively. Each one has its own wikiconfig.py under its directory. There is a farmconfig.py script in /home/moin/. What would one need to place in the <Location> directives of the Apache config file such that http://mysite.org/wikia/ goes to WikiA and http://mysite.org/wikia/ WikiB, via mod_python using farmconfig.py?

How to get spaces in the page_front_page

My site is set to convert spaces to spaces in page names. This works fine, except for the page set to the variable page_front_page in the moinconfig.py config file. So when starting to visit the site without a page name in the URL, the front page is displayed with underscores in the title, where I would expect spaces. Example: http://www.wijgoudenleeuw.nl/ Is there a solution?

  • You run an old moin version, can you try if this also happens with the latest one?

I am running debian packages moinmoin-common and python-moinmoin Version: 1.5.3-1.1, the newest version on debian etch = testing.

I fixed this problem without upgrading moin with this line in my apache config (root-wiki style):

RewriteRule ^/$         /Name_with_underscores

just above the rule for ^(.*)$ . I also wrote a note in the moinconfig.py file about this fix, otherwise I might get crazy later, trying in vain to set another front page.

Disable ErrorLogs in webbrowser, enable only in flat files

How to disable displaying of any error logs for ordinary user (or for everybody) in browser? I'd like only to have error logs written to the file (for example to /etc/moin/errors , or /var/log/moin-error.log) ?

  • Something similiar is planned for 1.6 -- ReimarBauer 2007-04-10 15:59:29

    • OK. but is it possible to disable displaying of error informations in webbrowser now? (moinmoin ver. 1.5.x) -- Yanaek

-- Yanaek 2007-04-19

  • See CHANGES of moin 1.5.8.

Even when I edit wikiconfig.py, surge protection won't turn off

I added this line

surge_action_limits = None (!) this only works for 1.5.5+

to the wikiconfig.py file but the surge protection still locks me out. (Desktop Windows version)

What an annoying feature! It's unacceptable to have my software lock me out for working at a fairly normal speed.

Help, anyone?

  • (!) For 1.5.4 you just have to configure high limits, see the help page.

What limits should I set? I've played with the high limites and I still get locked out. This is very frustrating! Any specific suggestions?

wikiconfig.py doesn't seem to be loading

I changed the value of some of the variables in wikiconfig.py (following the installation help files). I noticed no changes in the wiki itself, in particular the title did not change. So, I made sure that the path to wikiconfig.py was in the server script. However, it wasn't clear to me what script I should actually be editing, since in the server directory there are moin.cgi and moin.py and both have lines asking for the path to wikiconfig.py. Which script should I be editing, and am I missing anything else? Otherwise my wiki seems to be working quite nicely. I'm running Mac OS X 10.4. Thanks! -- Brian Taylor

  • Maybe you yourself are the only one who can answer this. moin.cgi is the cgi adaptor, usually used with apache or some other web server executing moin as a standard cgi script. moin.py is the standalone server, so if you don't want to install apache or some other web server, you can use this "python builtin" web server. -- ThomasWaldmann 2006-09-14 08:29:45

    • I figured out the problem. I was editing a copy of the wikiconfig.py file and not the wikiconfig.py file that was in the actual wiki. I'm new to the unix directory structure and it took me a while to figure out my mistake. Thanks for your feedback, though.
  • I found that with mod_wsgi, the wikiconfig.py changes did not take effect until I restarted apache2.
    • Maybe read the mod_wsgi documentation, it contains useful hints like that when touching moin.wsgi, it will restart the moin daemons.

CGI-Fehler

Die angegebene CGI-Anwendung hat keinen vollständigen Satz von HTTP-Headern zurückgegeben I'm running Windows 2003, IIS 6. The Configuration seems to be correct, but I always get the cgi-Error. Anyone an idea?

Supress URLs

Hi, can I prevent URLs entered in an article to be transformed into klickable links? I found a variable to add further protocols, but how to remove e.g. http? Thank You, -- mrdslave.

  • You can use preformatted text {{{http://example.com/}}} http://example.com/ or the Verbatim macro [[Verbatim(http://example.com/)]] http://example.com/. But most readers expect to be able to click on a URL - making URL useless seems like a bad idea.

Trying to enable discussion pages

Hi there. I've read HelpOnConfiguration/SupplementationPage and I've edited my wikiconfig.py, adding an extra line at the end which says

  • supplementation_page = True

I've restarted apache2, but I don't see any Discussion pages in my wiki (single instance). I don't understand what's going wrong. I haven't changed the wikiconfig since I first set up the wiki a year or so ago. It's worked fine ever since (apache2 has been upgraded several times - I'm running Debian Etch). Sorry if I'm being really dim. (Yes, I have logged out and then logged back in - still no discussion pages.)

  • /!\ This is a new 1.6 feature (this wiki and the MoinMaster wiki are running 1.6 now, release 1.6.0 is expected in december).

Thank you - nice to know I'm not stupid. I look forward to the 1.6.0 release.

Preventing the script name from appearing when using mod_python

Hi, using 1.5.8.

I usually use mod_rewrite in cgi mode so that moin.cgi does not appear in the URLs. As I don't want the name to appear in the URLs generated by MoinMoin, I edit moin.cgi and leave it like this:

from MoinMoin.request import RequestCGI
#request = RequestCGI()
request = RequestCGI(properties={'script_name':'/'})
request.run()

and everything works fine.

Now, I got my own server and I'm trying to set it up to use mod_python... I got everything working (including mod_rewrite), but the stock moinmodpy.py will generate the URLs with it's own name in it...

I guess that there should be something I could do in this part of the code:

from MoinMoin.request import RequestModPy

def handler(request):
    moinreq = RequestModPy(request)
    return moinreq.run(request)

but I don't know what.

I bearly read Python, so studying request.py is not helping me. Can someone hand me a recipe to do this?

TIA

-- MarianoAbsatz 2007-12-13 20:02:50

BUMP

Anyone can tell me if the above is indeed possible with mod_python???

I just upgraded to 1.6.3 and I'm not able to do this. What I want is to see http://wiki.example.com/RecentChanges instead of http://wiki.example.com/moinmodpy.py/RecentChanges (and that the links get generated that way internally).

I've done this many times with moin.cgi, but I can't see how to do this with moinmodpy.py.

I'm using moinmoin 1.6.3 with apache 2.2.4 under ubuntu 7.10 (gutsy).

The virtual host config file looks something like this:

<VirtualHost *:80>
    ServerName wiki.example.com

    ServerAdmin webmaster@example.com

    DocumentRoot /var/vhost-www/wiki.example.com/

    <Directory /var/vhost-www/wiki.example.com/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all


                #DirectoryIndex moin.cgi index.html
                # start the rewrite engine
                RewriteEngine On
                RewriteBase /

                RewriteRule ^moin_static.../ - [last]
                RewriteRule ^(/.*/)?moinmodpy.py - [last]

                RewriteRule ^(.*)$ /var/vhost-www/wiki.example.com/moinmodpy.py$1 [type=application/x-httpd-cgi]

    </Directory>

    ErrorLog /var/log/apache2/vhost/wiki.example.com/error.log
        RewriteLog /var/log/apache2/vhost/wiki.example.com/rewrite.log
        RewriteLogLevel 2

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/vhost/wiki.example.com/access.log combined
    ServerSignature On

        ## WIKI
        #ScriptAlias /moin.cgi /var/vhost-www/wiki.example.com/moin.cgi
        <Location />
            SetHandler python-program
                # Add the path of your wiki directory
                PythonPath "['/var/vhost-www/wiki.example.com', '/usr/local/etc/moin'] + sys.path"
                PythonHandler moinmodpy
                PythonDebug On
        </Location>
        <LocationMatch "/moin_static...">
                SetHandler None
        </LocationMatch>

</VirtualHost>

in /var/vhost-www/wiki.example.com I have a copy of /usr/local/share/moin/htdocs named moin_static163 and a modified copy of moinmodpy.py as follows:

# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - mod_python wrapper for broken mod_python versions

    add a .htaccess to the path below which you want to have your
    wiki instance:

    <Files wiki>
      SetHandler python-program
      PythonPath "['/path/to/moin/share/moin/cgi-bin'] + sys.path"
      PythonHandler moinmodpy
    </Files>

    Note: this is a wrapper needed because of a bug in
          mod_python < 3.1.3


    mod_python.apache.resolve_object fails to parse a object with dots.

    If you have a newer version, take a look at moinmodpy.htaccess
    to see how to use MoinMoin without this wrapper. You can also
    look into INSTALL.html to see how you can fix the bug on your own
    (a simple one line change).

    TODO: this should be refactored so it uses MoinMoin.server package
          (see how server_twisted, server_wsgi and server_standalone use it)

    @copyright: 2004-2005 by Oliver Graf <ograf@bitart.de>
    @license: GNU GPL, see COPYING for details.
"""

# System path configuration

import sys

# Path of the directory where wikiconfig.py is located.
# YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
#sys.path.insert(0, '/path/to/wikiconfig')
sys.path.insert(0, '/usr/local/lib/python2.5/site-packages/')


# Path to MoinMoin package, needed if you installed with --prefix=PREFIX
# or if you did not use setup.py.
## sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')

# Path of the directory where farmconfig is located (if different).
## sys.path.insert(0, '/path/to/farmconfig')
sys.path.insert(0, '/usr/local/etc/moin')


# Debug mode - show detailed error reports
## import os
## os.environ['MOIN_DEBUG'] = '1'

# Simple way
#from MoinMoin.server.server_modpython import modpythonHandler as handler

# Complex way
from MoinMoin.server.server_modpython import ModpythonConfig, modpythonHandler

class MyConfig(ModpythonConfig):
    """ Set up local server-specific stuff here """

    # Make sure moin will have permission to write to this file!
    # Otherwise it will cause a server error.
    logPath = "/var/log/moin/moinlog"

    # Properties
    # Allow overriding any request property by the value defined in
    # this dict e.g properties = {'script_name': '/mywiki'}.
    ## properties = {}
        #properties = {'script_name': '/'}

def handler(request):
    return modpythonHandler(request, MyConfig)

/usr/local/etc/moin holds my farmconfig.py.

-- MarianoAbsatz 2008-05-03 15:35:09

SOLVED

Well... it turned out that the mod_rewrite loop was originated by having a <Directory> section within the <VirtualHost> and having the RewriteRule's there... I'll try to elaborate a bit by updating HelpOnInstalling/ApacheWithModPython with some info... but now I'm going to sleep... :-) -- MarianoAbsatz 2008-05-04 11:10:38

navi_bar and spaces in page names

I have migrated to 1.6 and stumbled upon following: some of the pages have spaces in their names (all well so far, they were renamed from underscores when migrating), but I cannot find out how to write their names into navi_bar. The previous navi_bar = [u'[Hlavná_stránka Hlavná stránka]'] does not work, since Hlavná_stránka is not the same as Hlavná stránka. Replacing the underscore with a space does not work, obviously. Neither does using &x20; or the (semi-expected) pipe [Hlavná_stránka|Hlavná stránka]. Is there any way of escaping the space? I have resorted to renaming the page to Hlavná_stránka (with an underscore), but clearly that is not an universal solution. -- 147.213.138.3 2008-04-30 11:21:49

  • For navibar, 1.6 still uses ["Free Link"] syntax. Sorry about this inconsistency, but the respective changeset was forgotten when backporting from 1.7. Starting with 1.7.0, it will consistently use the new link markup. -- ThomasWaldmann 2008-04-30 12:37:04

How do I remove the Quick links form from the page xxx?action=userprefs&sub=prefs completely? I have tried: user_form_remove = ['quick_links'] in wikiconfig.py but that does not work for me.

Thanks. -- JohanZiprus 2009-07-10 13:30:04

How can I redirect the wiki pages from http to https?

I have installed a wiki (1.7.1) under linux (Apache with modpython). This wiki is configured as root wiki and working fine. I would like redirect all wiki pages from http to https. Who does know the recipe for it?

Thanks for your help!

Cyrillic pages names

I have several pages named in cyrillic. The problem is that folders in wich the pages are stored on disk are named in unreadable way: for example page 'поезд' (poezd - train in Russian) is stored in "(d0bfd0bed0b5d0b7d0b4)" folder - it seems like a raw unicode output. This is very inconvenient - for example it's hard to access that folder from my macro. Can I make pages with cyrillic names be stored in folders named as the pages themselves? (поезд - поезд, not поезд - (d0bfd0bed0b5d0b7d0b4))

(!) Currently (as of moin 1.7/1.8/1.9 there is no easy way to do this). We did choose this encoding because it works everywhere (no matter what your FS encoding is, no matter whether linux or windows). We are working on improved backend storage for moin >= 2.0. -- ThomasWaldmann 2008-10-17 02:40:26

Macro names appearing in rendered pages

If accessing a wiki page that doesn't exist, on the new page template we see "Action(edit,Create new empty page)" instead of a link to create a new page. On the RecentChanges page, we see RandomQuote() and Icon(diffrc) rather than a quote and an icon. I believe this behavior started around the time that I updated MoinMoin to 1.7.2. Any ideas how to troubleshoot this problem?

(!) You likely forgot to update your underlay directory with the new one we provide in the distribution archive as wiki/underlay/.

wiki.py missing

(!) Those instructions are obviously for an old moin version. In recent moins, the wiki parser is in MoinMoin/parser/text_moin_wiki.py.

Configure MoinMoin to use a different server for static stuff

I see that when I load a page from moinmo.in, the CSS, Javascript, and images actually come from static.moinmo.in. How do you do that?

User Authentication

HTTP Basic authentication with IIS

Is it possible to use HTTP Basic authentication with IIS? In IIS config GUI, in the properties of my website -> Directory Security Tab -> Authentication and access control Edit.. button, I removed everything except Basic authentication. I'm using MoinMoin 1.5, Python 2.4.2 and IIS 6 on Windows 2003. -- RemyRoy 2006-01-24 21:56:24

  • Try like this:

from MoinMoin.auth import http
class Config(DefaultConfig):
    user_autocreate = True
    auth = [http]
    #...

Thanks, it works! -- RemyRoy 2006-01-25 16:21:06

Problems with http authentication

The docs for enabling authentication via http auth specify adding the following to wikiconfig.py

from MoinMoin.auth import http
auth = [http]

This is misleading. To make http auth work, at the *top* of the file add:

from MoinMoin.auth import http

And *inside* the Config class, add

auth = [http]
  • (!) It doesnt matter where you do this as long as you indent it correctly (to indent, use spaces (say 4 spaces), not tab/s).

Note that it appears that the http authentication mechanism is broken in moinmoin 1.5.7-3. I had to use the method defined at http://moinmoin.wikiwikiweb.de/MoinMoinQuestions/Administration (search for Can apache REMOTE_USER replace moinmoin login?) on that page.

Also, the main authentication help page at http://moinmaster.wikiwikiweb.de/HelpOnAuthentication cites wrong code:

from MoinMoin.auth.http import http
from MoinMoin.auth import moin_session
auth = [http, moin_session]

should be replaced with:

from MoinMoin.auth import http
auth = [http]

This has already been done (corrected?) at http://moinmoin.wikiwikiweb.de/HelpOnAuthentication

Hmm, is it wrong on the new site http://moinmo.in/HelpOnAuthentication ? -- PascalR 2008-01-29 10:49:03

This don't work on MoinMoin 1.7, I get the error 'module' object has no attribute 'name' -- fho

This works thx Reimar :) -- fho

How to set .htaccess file for HTTP Basic auth with Apache

I'm running MoinMoin 1.6 on Apache and Python 2.4.4. My ISP is allowing only FTP access to my /htdocs and /cgi-bin directory, there is only HTTP Basic Authentication and the only way to configure Apache are the .htaccess files in my directorys.

I have the moin.py file in the /cgi-bin directory and the rest of MoinMoin is in /htdocs/moin160. In the /cgi-bin directory the Apache configuration trough the .htaccess file does not work. Does the Authentication with HTTP Basic works with .htaccess settings in the /htdocs/moin160 directory? In case it is possible, how should my .htaccess file look like? -- PascalR 2008-01-29 10:49:03

How do I implement LDAP authentication through Apache

One way to achieve this is to use basic authentication in Apache and http auth in moinmoin (better if you configure ssl in Apache so that password in basic authentication is not in cleartext)

I put the configuration produced below inside a VirtualHost directive in apache site-configuration (e.g., /etc/apache2/sites-available/default on Ubuntu; of course, I had first made sure LDAP server was up and running fine and the LDAP module was loaded properly in Apache; also note that in Ubuntu, in the simplest default setup, speaking of version 7.10, the LDAP search query below should have cn instead of uid though that is a bad strategy and you should instead configure LDAP properly and use uid attribute instead of cn; also in case you do not have a domain, Ubuntu will setup the initial LDAP entries under the domain named nodomain instead of somedomain):

        <IfModule !mod_fastcgi.c>
        ScriptAlias /MyWiki "/usr/share/moin/mywiki/moin.cgi"
        Alias /wiki/ "/usr/share/moin/htdocs/"
        </IfModule>
        <IfModule mod_fastcgi.c>
        AddHandler fastcgi-script .fcgi .fcg
        ScriptAlias /MyWiki "/usr/share/moin/mywiki/moin.fcg"
        Alias /wiki/ "/usr/share/moin/htdocs/"
        </IfModule>
        <Directory "/usr/share/moin/mywiki">
                Order allow,deny
                allow from all

                AuthType Basic
                AuthBasicProvider ldap
                AuthName "Wiki"
                # tweak this ldap query to return a unique user name
                AuthLDAPURL "ldap://localhost:389/dc=somedomain?uid"
                Require ldap-user AnLDAPUser
        </Directory>
        <Directory "/usr/share/moin/htdocs">
                Order allow,deny
                allow from all

                AuthType Basic
                AuthBasicProvider ldap
                AuthName "Wiki"
                # tweak this ldap query to return a unique user name
                AuthLDAPURL "ldap://localhost:389/dc=somedomain?uid"
                Require ldap-user AnLDAPUser
        </Directory>

For basic authentication, I also disabled the login/logout link (was no point having it there): see http://moinmoin.wikiwikiweb.de/HelpOnConfiguration to learn how to do it.

How do I implement LDAP authentication

I have MoinMoin setup and running fine...I would like to use our Active Directory server via LDAP to authenticate and create users. I have read a few pages in this Wiki about it but they don't seem to work. Can someone give me some step by step instructions as in which files to edit/download? Thanks in advance.

  • ldap/ad support is in 1.5.3 including some sample config.

How do I integrate LDAP authentication with moin moin? (1)

I read several pages on this site that MoinMoin can be integrated with LDAP but none of them seem to be explanatory on what needs to be changed, One page lists the wikiconfig other pages just list python code but dont say what file the code needs to be placed in. Can someone please help me with some instructions.

Thanks

Chris

  • For information on authentication in general see HelpOnAuthentication. Unfortunately it looks like it hasn't been updated to document the LDAP authentication support. Basically in your wiki configuration you need to add/edit an auth parameter to be a list of authentication methods. This normally defaults to just [moin_cookie]. You need to add in the ldap authentication before that, as import MoinMoin ; auth = [MoinMoin.auth.ldap_login, MoinMoin.auth.moin_cookie]. You'll also need to add quite a few LDAP-specific configuration parameters to tell it how to query/bind to your particular LDAP server. The best thing to do until documentation is written is to read through the MoinMoin source code file MoinMoin/auth.py and look for the ldap_login() function. I haven't used it, but it looks like it wants these configuration parameters: ldap_coding, ldap_uri, ldap_binddn, ldap_bindpw, ldap_base, ldap_scope, ldap_timeout, ldap_name_attribute, ldap_email_attribute. From reading the code it looks like ldap_enconding is the character set used to communicate with your server, such as 'ascii'. ldap_binddn and ldap_bindpw is a user/pass binding for LDAP used for the initial query for the user (once the user is located in your tree, a second bind is performed with the user's DN and the pass-in password). ldap_base, ldap_scope, ldap_name_attribute, and ldap_timeout are used for the initial query for the user--the query filter is something like (UNAM=johndoe) if ldap_name_attribute is UNAM and johndoe is the entered username, and is limited to the tree rooted at ldap_base and within ldap_scope. The ldap_email_attribute names the field which contains the user's email address. -- DeronMeranda

When authenticating against Microsoft AD with LDAP username is not casesensitive but MM is. It can cause some trouble like users login some time with lower and some time with uppercase. MM creates two profiles with different settings, so when a User edits a page he might get a diff-email when the other profile has an abonnement on that page. To change all usernames to lowercase add following entries to auth.py

These changes are for 1.5.x only, newer versions authenticate another way

about line 131 add

  • if username: username = username.lower()

should look like this

    def moin_cookie(request, **kw):
    """ authenticate via the MOIN_ID cookie """
    username = kw.get('name')
    if username: username = username.lower()

about line 331 (ldap_login) add

  • if username: username = username.lower()

should look like this

    username = kw.get('name')
    if username: username = username.lower()

after this names in all profiles (data/user) must be lowercase, uppercase should be changed to lowercase.

LDAP or Active Directory?

Is a Userauthentification over LDUB and/or Active Directory possible? Thanks -- Pablo

http + ldap authentication (NTLM + Active Directory)

Autologin with auth.http is working on IIS6 with NTLM (Integrated Windows Authentication). Manual login with auth.ldap_login + auth.moin_cookie works, too. Is it possible to combine these methods to autologin with NTLM/http and get aliasname and email from LDAP?

  • Yes, you just have to write some code using the existing username (user_obj.name or similar) to make an ldap lookup and update the user object (and save it to disk). If you hack auth stuff, try to use latest moin version.

How do I integrate LDAP authentication with moin moin? (2)

I have seen DeronMeranda post but need more infomation.

I understand I have to add the following line in my wikiconfig.py for LDAP authentication

    from MoinMoin.auth import ldap_login, moin_cookie
    auth = [ldap_login, moin_cookie]

Looking at MoinMoin/auth.py in MoinMoin were do I place the following parameters: ldap_coding, ldap_uri, ldap_binddn, ldap_bindpw, ldap_base, ldap_scope, ldap_timeout, ldap_name_attribute, ldap_email_attribute.

  • Into your wikiconfig.py

How do I debug this? By setting ldap_verbose in the same place as the above parameters ?

  • Yes.

Were do the debug messages appear ?.

  • Look into apache error.log (if you use apache).

Is there any other place I can be pointed to for LDAP authentication in MoinMoin.

  • There is a sample config in wiki/config/more_samples/ called ldap_smb_farmconfig.py . Be sure to read the comments, as some of the ldap_* variables are required.

Help will be greatly appreciated.-- Jehan

Why bother with banging your head to get MoinMoin to talk to your Active Directory LDAP server?

Use Apache's LDAP authentication module instead, and pass it to MoinMoin's HTTP authentication method!

My .htaccess:

AuthName "My Wiki"
AuthBasicProvider ldap
AuthLDAPBindDN " user@doamin.tld "
AuthLDAPBindPassword "mypassword"
AuthType Basic AuthLDAPURL "ldap://mydc.domain.tld:389/DC=Domain,DC=tld?sAMAccountName?sub?(objectClass=user)" NONE Require ldap-attribute objectClass=user

How do I integrate LDAP authentication with moin moin? (3)

Looking at MoinMoin/auth.py in MoinMoin were do I place the following parameters: ldap_coding, ldap_uri, ldap_binddn, ldap_bindpw, ldap_base, ldap_scope, ldap_timeout, ldap_name_attribute, ldap_email_attribute.

  • You say Into your wikiconfig.py

Can you give me an example of what I need to put in wikiconfig.py for one of the variables lets say ldap_binddn Unfortunately the sample config in wiki/config/more_samples/ is not great at all.

  • Well, we can't know your ldap setup, but the config you see in ldap_smb_farmconfig.py is a real world example for Active Directory (with the real company name replaced by example.org). You don't need the smb_* stuff btw. If you can read python (it's easy), maybe look at MoinMoin/auth.py -> def ldap_login(... - as you see there, the following happens:

    • it initializes an ldap connection to ldap_uri
    • it expands ldap_binddn and ldap_bindpw with some variable content like username and password etc. (this is optional, you also can use some fixed value)
    • it binds to the directory using this (as that stuff is a encoded string, it uses ldap_coding to encode name and password - this is interesting for non-ASCII characters)
    • now it makes up a ldap filter string "(%s=%s)" with ldap_name_attribute (where is the username stored?) and the current username and uses this filter to search for that username in that attribute, using ldap_base as base DN and ldap_scope for the scope.
    • depending on how much hits this search returns, the following will happen:
      • none: we didn't find the user, auth will fail (as far as ldap_login is concerned)
      • more than 1: we have multiple users of that name, this is no good (auth will fail ...)
      • one: great, we found that (unique) username in the directory and can continue
    • now it will bind again to the directory, using the DN we found in the search and the password given at login
    • if this fails, it'll break out with an exception like ldap.INVALID_CREDENTIALS (auth will fail ...)
    • if it succeeds, the password was obviously correct for this username, so we construct a user object now:
      • we fetch the email address for the user profile from ldap (from ldap_email_attribute) and decode it using ldap_coding
      • we fetch surname and givenname from sn and givenName attributes and make up the aliasname for the profile using them (this is nice if the login username is cryptic)
      • the wiki username will be the one given for login
      • we make sure the cookie_lifetime is honoured, thus the cookie will expire, forcing the user to re-login after expiry
    • the end, auth succeeded!

Thank you Jehan

Notes for ldaps

  • Use an ldap_uri like 'ldaps://some.ldap.host', then don't worry about ldap_start_tls (it is ignored w/ldaps URI)
    • * Be sure that if ldap_tls_cacert{dir,file} are set, they only have the necessary certs
    • python-ldap seems to move _really_ slowly if you have a lot of CA certificates (at least on Debian)

LDAP Groups

I want to permit only members of certain LDAP group to logon to my wiki.

I have modified auth.py like the following:

      try:
            request.log("MEMBER %s" % ldap_dict['memberOf'].index("CN=blob,CN=Users,DC=vmware,DC=com"))
        except:
            request.log("NOT A MEMEBER of blob!")
        else:
            return user_obj, True
        if result_length != 1:

I thought this would work since if the user is a member of blob, it'll return the user object. But currently, it lets everyone log on, just like before. Any suggestions?

  • Set ldap_filter (there is a commented out example in the sample ldap config).

How to require SSL+httpd auth for specific operations

I can get SSL+httpd auth working just fine, but I can't figure out how to set things up so that both are required for write/admin/etc access, but neither are required for read access. Any ideas?

SSL Login

Is it possible for just the login/user create/user preferences portion of a wiki to be redirected to a secure link, but all other pages run in a non-encrypted fashion? -- MichaelLaccetti 2007-02-27 05:19:02

  • No, and if you use moin's cookie stuff, it wouldn't make much sense as the cookie transmission happens on every request and would need protection also.
    • Even if they shared the same URL; just used https:// for login? Cookies work for the same domain, regardless of encryption. -- 74.100.133.5 2007-03-01 04:55:22

How can you configure moin to require SSL for everything (On apache)? It seems to ignore the RequireSSL flag in httpd.conf. -- Alexander Faucher <<DateDate()>>

Embedding MoinMoin -- Automatic User Login?

I'm looking to embed MoinMoin into an application that uses php, and I was wondering how I could go about using php_session for a single sign on integration. I see that it's currently only supported with eGroupWare 1.2, but examples on how to use php_session to extract session info seems to not be around, as well as trying to get it to work for another application. Any help here? Thanks in advance. StevenM 05-Mar-2008

I'd like to use MoinMoin as a Wiki-based knowledge base by opening an appropriate URL from inside an application. Since my application has a user database built-in, it is necessary to promote the user ID to the wiki. Provided that the MoinMoin user IDs are the same as the application's: Is it possible to embed the user ID (and, optionally, the password) into the URL of the wiki page to be shown? Thx... StefanK 14-Dec-2006

  • (!) Look at MoinMoin/auth.py (and there is also some old code for 3rd party cookies in contrib/ in the MoinMoin archive)

I needed similar functionality to hook salesforce.com into MoinMoin as a knowledge base. Another use for me is for a phone/email list page for my neighborhood. While I don't want to force everyone to create a user profile and login just to get to the phone number list, I also want to deny access to anonymous Internet users that might happen onto my site. I found (url) which has the format for logging in with a one-click URL.

One-click login requires this format:
 http://someserver.org/moin/moin.cgi/HomePage?action=login&name=somename&password=yourpwd&login=login 

Now I can create a standard 'guest' account and email the one-click URL. The page will be fairly safe from anonymous Internet bad people and the intended recipients have a good end-user experience.- CraigA 4/1/2007

Feedback: the discussion link above showed the way for me: I had to disable the POST-only check for the login action (userform.py, approx. line 90). Now simply GETting the URL works fine. Thank you very much! StefanK 21-Feb-2007

How can I implement single login for a farm

I would like have users log into all wiki in our farm form one login. The users accounts are already shared across the farm but you have to login to each instance spereratly. I did try setting cookie_domain = 'mainwiki' but this just prevented login form working. I am not sure that I used it correctly.
We are using moin in standalone with one main wiki (mainwiki), and some project specific wikis (projecta.mainwiki and projectb.mainwiki). Cheers, -- ManuPoletti 2008-04-29 00:59:43

I have got the same problem. We run a wikifarm with many wikis. But the question now is: What do i have to do, that one useraccount is able to write/revert whatever in every wiki? Madis R. 09-Sep-2008

Solution:

  • Optional: Create a single wiki for the user homepages. Use also user_homewiki to configure that all user homepages are saved on the same wiki
  • Put all the userdata into a same directory (use the config user_dir)
  • Use the same cache dir for all farm wikis (use the config cache_dir)
  • Now you can configure the session cookies to use the same cookie_domain and also use the same cookie_path.

for more information see HelpOnConfiguration and here HelpOnSessions, bye -- MarcelHäfner 2009-04-04 08:04:02

How do I integrate LDAP authentication with moin moin? (4)

I have combined LDAP/AD authentication with moinmoin auth for cases when the user is not listed in AD.

Firstly, I just added config data from samples followed by  auth = [my_ldap_authenticator, MoinAuth()]  line. But I discovered that if the user connected to LDAP successfully, but could not be authenticated there then according to the  auth/ldap_login.py  the authentication stoped with  CancelLogin .

When I replaced that line with  ContinueLogin , like it is implemented for ldap.SERVER_DOWN exception then everything worked fine.

So I wonder why don't developers use  ContinueLogin  for ldap.INVALID_CREDENTIALS too? -- AlexanderAgibalov 2009-06-30 13:40:55

I thought the usual usecase for LDAP it that it is authoritative about who is able to login and who not, thus it does not set the continue flag if someone is not in the directory. -- ThomasWaldmann 2009-06-30 18:06:58

OK, I see. Then I'll just apply this patch myself for every upgrade of my wiki. The reason why I need this is that we have corporate users who are listed in AD and several contractual employees who are not. Currenly we are using native authentication, but people continue to constantly forget not only their passwords, but usernames too :) But they always remember their AD credentials. -- AlexanderAgibalov 2009-07-01 11:02:18

Permissions and ACL related

allow 'admins' to delete/overwrite attachements?

Atm only superadmins are allowed to delete or overwrite attachements on our page, is there any way to configure a 1.8 moinmoin to make this possible for normal admins/special usergroups? Tried several searches here on that theme but wasnt very successfull as it seems.

  • (!) I don't think your problem is related to "superuser" configuration, but rather a standard ACL problem. For deleting or overwriting (which is deleting and writing) attachments, you need to have "write" and "delete" rights on the respective wiki page. If you are not logged in, you usually don't have "delete" rights. If it still does not work after logging in, check your acl_rights_* configuration and the ACLs on that page.

Disallow removal of own admin permission

Users often make mistakes editing ACL strings and inadvertantly change the page permission such that they cannot revert the change. There should be a configuration option disallow removal of your own read/write/admin permission on a page. Or maybe a confirmation dialog warning them that they are about to remove their own permission from the page. -- VitaliyShchupak 2008-07-20 11:48:22

  • This is why you don't give admin rights to users not capable of correctly using it. -- ThomasWaldmann 2008-07-20 12:10:37

Is it possible to disable read on ALL pages except login?

I want to prevent viewing of every single page (all, even the help pages) in my wiki. Users in a certain group will be able to view pages after logging in. The problem is that many pages (Help, recent changes, etc...) specify read for All in their ACL. The only way to override that is to specifly no privs for All in acl_rights_before, but then that would block everyone from the login page too. The FAQ above for closed community says to use acl_rights_default and set All : blank, but that won't stop people from seeing help and recent changes. Is there any way to do this other than to edit every page in the system to remove the All : read line?

You have two options:

  1. Change the acl of all problem system pages and add All: to block anonymous users. You want to do this change with a script, so you can fix the acls after upgrading the system.
  2. Write custom SecurityPolicy that block anonymous users on all pages expect the login page. This should be easier and avoid upgrading issues.

(!) System / Help page ACLs were changed in moin 1.7 (they just take away "write" rights now and otherwise use Default ACLs. So if you change your default ACL, the change is also implemented by the system / help pages.

Why is block all except login possible with the following scenario?

In MoinMoin ver. 1.6.0, with acl_hierarchic = True and acl_rights_after = u"All:", the above (block all pages except login) is accomplished. We have acl_rights_before set to allow a specific admin group all privileges, and acl_rights_default set to allow a user group read,write,delete,revert. Only users in either the admin or user groups can view pages at all. My question is, why does this work? Is it a bug or a feature?

  • Sorry, I have trouble to understand your question.
  • There is a bug in hierarchic acl processing, see SecurityFixes. <- That's why it's behaving in that manner. Thanks.

  • Strictly taken, using "All:" ACL doesn't make much sense (it does no harm, but it is not necessary).

Administrating ACLs is cumbersome

Here's what I want to do. I want a certain user to be able to manage ACLs for a certain area of the wiki... say everything under a certain page. Without any hierarchical access control scheme, I can't just give him admin rights to the top page and let him go. It means that every single page he creates that needs any sort of access control, I have to go and manually add them to each page ONE AT A TIME! This is not only an annoyance for me, it also slows him down.

So I came up with an Idea I thought might work... Create a template that contains an ACL line giving this author admin rights, and restricting read rights so that only he has access to that template. I thought this might allow him to create pages by basing them off of this template. But alas, it appears that creating a page from a template amounts to a cut and paste of the text from the template, so non-admin types are not allowed to "add" the acl's to the new page (even though they were already granted in the template).

Does anyone know of a way to give someone the ability to create certain pages with them as an admin, but without giving them admin rights to the entire wiki? -- SteveDavison 2007-03-01 22:03:43

You can't change ACLs on this page since you have no admin rights on it!

I get this error msg when I try and save a newpage w/ acl's on it and I the TrustedGroup has admin rights to both.

Here's the acls on the page #acl TrustedGroup:read,write,delete,revert,admin

Here's the acls on the template for the new pages created by this group #acl TrustedGroup:read,write,delete,revert,admin

the result is the new pages fail to save w/ this error You can't change ACLs on this page since you have no admin rights on it!

thanks in advance

--Andrew

  • I added acl_rights_before = u"admin:admin,read,write,delete,revert TrustedGroup:admin,read,write,delete,revert" to the wikiconfig.py and trusted group can add pages now! Seems that before doing this TrustedGroup could admin, edit pages, edit the acl lines on the pages, just not save a new page w/ an acl line included. Not sure if a bug or pilot error...

Lost Admin Rights?

I think I'm in over my head. I am completely new to wikis. But yesterday I set up a wiki page and specified myself as the administrator. I then set up a users page, and I went to edit one of the names I listed, and it said "You are not allowed to change this page." I can't figure out what happened. Thank you -- Laura 19 Dec 06

  • The page HelpOnAccessControlLists in your wiki describes how it works. Keep in mind that "admin" right only means "being able to change ACLs", it does not include any other right like "read" or "write".

attachments only for certain users

Is it possible to finetune acl to allow anonymous and new registered users to edit the page but WITHOUT the permission to add attachements. and add an acl rule to each user that should be allowed to add attachments. thank you for your responds. HatschMa 01/12/2006

Not with a standard moin, it just uses the page ACLs for the page's attachments. For moin 1.5 you could patch AttachFile.py to not check for "write" rights, but for "attachwrite" right and add that right to the valid acls list. In some future moin version (not 1.6), file attachments will be first class items with own ACLs.

Project group members need permission to create new group pages?

I set up some independent groups, each one with it's own adminstrator. The default permissions permit Known users to read/write/edit but not admin for default pages. I set up templates for each group that allow the group to read/write/edit their pages and their admin user to read/write/edit/admin. I find that the group users get a "you can't change the permission of this page" when they try to create a new page using the group template. Is there a trick here to make that work? Is that what AutoAdmin is for?

Many thanks in advance for your help.

  • Any suggestions about where to look on this one? 2009-07-10 13:30:04

How to change a protected page into a non protected page

In my local wiki (MoinMoin Version 1.5.2 on IRIX64) the page WikiSandBox is a protected page ("Geschützte Seite"). Even though I have administrator rights I did not found a way so that any user can experiment with this page. What can I do to change the status of this page?

  • How is acl configured in wikiconfig?

    • acl_rights_default = u'StudentGroup:read,write,delete,revert All:read'
      acl_rights_before = u'AdminGroup:read,write,delete,revert,admin '

      I belong to the AdminGroup but I cannot edit this page, too.

  • Is there an acl line in your WikiSandBox?

    • I think it is the default WikiSandBox without any acl and because of this problem I had no chance to modify it. (Of course you can change the source code via the operating system.) It has the following lines in the beginning of the page: {{{## Please edit system and help pages ONLY in the moinmaster wiki! For more

#format wiki #language en (...)}}}

  • Maybe check filesystem access rights for the underlay directory. And probably who is the owner of this dir and who is the owner of the webserver process. Does it match?

I made some tests varying owner and file permissions but had no success. It remains protected. I solved the problem for me by copying the directory WikiSandBox manually from underlay/pages into the data/pages directory and changed its file permissions according to other files in this directory.

Beside my special problem I have some difficulties in understanding the general concept of the underlay directory. I understand that pages in this directory are normally read-only and should not be altered by users. There are only few exceptions like e.g. the WikiSandBox. But what do you have to do when you like to change such a page (in a perfect installed wiki setup). How do you change the state of a page from "protected" to "non-protected"?

Adding Myself As An Administrator

I just installed the latest stable version of Moin on FreeBSD + Apache in my $HOME directory on a shared web server. Everything is working very well except for the fact that I can't act as an administrator in my wiki.

I found the MoinMoinQuestions/Administration "How To Become An Administrator", and followed its directions. First, I registered with the site using a username of TomPurl. I then checked the $INSTANCE/data/user directory and made sure that the TomPurl username existed. I then added the following line to $INSTANCE/wikiconfig.py:

acl_rights_before = u"TomPurl:read,write,delete,revert,admin"

I then logged into Firefox, but was unable to delete, rename, or add attachments to pages. To troubleshoot, I deleted all of my cookies and then logged in again. Still, no luck. I've even restarted Apache.

Can anyone else think of something that I could try to get this to work?

Thanks! - TomPurl

  • probably you have missed to set

allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage']

in your wikiconfig.py -- ReimarBauer 2005-12-30 18:19:39

How to prevent user-creation?

I don't want to have any users except me. I'm running Version 1.5.0beta4, so that http://moinmoin.wikiwikiweb.de/FeatureRequests/NewUserCreationACL won't run. (i tried everything, but i didn't get it)

  • Use access control lists.

    • I can't find anything on that page that mentions disabling user creation. The login page seems to double as an account creation page. I need access to a login page, but not account creation. How do we fix that?
      • Please add this as FeatureRequest

        • Strange that this is a new feature - nobody wants his Wiki to be potentially spammed by billions of bots or something. Should be a basic feature :)

      • I've set the ACL on UserPreferences for All to nothing ("All: ") while keeping rights for registered users ("MoinPagesEditorGroup:read,write,delete,revert"). It seems to me that this lets people still login but disables creating new user accounts. Am I missing something?

Adding users

I'm doing a wiki page for a company. My boss will be the admin, got all the rights etc. This wiki will not be edited by unknown people, only the users that my boss allow. How do the admin add the users to a group or what? Thanks.~

Do read HelpOnAccessControlLists

How do I set the limit on the size of attachments?

MoinMoin does not offer this facility, but if you use apache >= 1.3.2 then you might like to look at the LimitRequestBody directive

Prevent Editing When Not Logged In

I've searched and searched for how to do this, but can find nothing. I think the ability exists, since I have seen mention in several other questions of someone not being able to edit a page because they are not logged in. Are there instructions anywhere that describe how to configure MoinMoin to require login for edits? Thanks. --SteveDavison

Disable overwriting attachments for common users

Common users (anonymous and logged in) can't delete attachments, only administrators can do that. Which is good, because these changes can't be reverted. But I found out that anonymous users can overwrite attachments with whatever they want, it's enough to check "Overwrite existing attachment of same name" checkbox (moinmoin 1.5.7). This way evil anonymous users can destroy all my images/other attachments on my wiki in a few minutes, and I cannot revert it. How can I disable overwriting feature for non-admins? --Kamil

Changing ACL-Rights on user-created pages without giving every user ACL-'admin' rights on the whole Wiki?

I want to make it possible for normal Users to set ACL write-permission only for themselves on their pages, to create a simple Character-Database ( http://mylairexil.de/wiki/CharakterSeiten ) is this possible without giving every ACL-'admin' rights for the whole wiki, and without intervention of an Admin or TrustedUser on every Charpage?

You should define "their" pages. Moin does not have the concept of page "owner". However, if you to give write access to sub pages of the user page, you can do this with a custom security policy. Subclass MoinMoin.security.Permissions, and define a write method that check the current page name against the current user name and allow only the user to write on his sub pages ignoring the page acl. See SecurityPolicy for more info.

Version 1.5 has autoadmin security policy that give admin rights to user pages, but it is not recommended for common users, because they will not be able to set ACL correctly. see HelpOnAutoAdmin.

Cannot get AutoAdmin to work

I want to enable users the ability to setup their Homepage using the HomepageTemplate with a pre-defined ACL. To do this they need 'admin' rights. I am using AutoAdmin and below is what I did

  1. Added the following line to wikiconfig.py, using Moin version 1.6.1

from MoinMoin.security.autoadmin import SecurityPolicy

  1. Created AutoAdminGroup page

  2. Added usernames to the AutoAdminGroup page which should enable these users 'admin' rights

But it does not seem to enable 'admin' rights. Am I missing something, can you help?

Kim Tran - 2009-07-10 13:30:04

Also cannot get AutoAdmin to work

The HelpOnAutoAdmin page is woefully inadequate. It mentions things but does not explain them fully or even tell you what they do.

Are page/ReadGroup and page/ReadWriteGroup supposed to work on projects as well as users? And how do you get them to work?

I can only assume that if a user is in ReadGroup or ReadWriteGroup that they are able to read all subpages by default, and the ReadWriteGroup also can edit. But I set up the ReadGroup and ReadWriteGroup pages with nothing in them, and I can still see and edit all of the subpages. Do I have to add ReadGroup, etc., to the AutoAdminGroup page as well as the page/AdminGroup in order to activate them?

HelpOnAutoAdmin mentions that you can set up project/ReadGroup, project/ReadWriteGroup, etc., but doesn't say what the "etc." includes. Can I create a project/RevertGroup or project/DeleteGroup? Or what about a WriteRevertGroup?

And another thing that needs explanation is, how exactly do these groups affect the acl's of a page? Is it sort of like an automatic #acl +ReadGroup:read +ReadWriteGroup:read,write +AdminGroup:admin added to each subpage? If the subpage has its own acl line, does this prevent the AutoAdmin ACLs from working (i.e., do the automatic rights work like "default", "before", or "after" acl rights?

Oh, I should mention that I'm using version 1.5.8; I checked the latest HelpOnAutoAdmin and it seems to be identical to the 1.5.8 page, so I assume there haven't been significant changes since.

Thanks for any help... -- SteveDavison 2008-07-03 04:52:36

NewPage macro + ACL = You are not allowed to edit this page

I am using Moin 1.7 and am trying to set it to use the NewPage macro to make structured page creation easier on the users. I also have ACL's (hierarchic, if this matters) enabled. Now a certain user belonging to a certain group can easily create sub pages, perform edits, and do what they need to do. However, when they try to perform this task through the NewPage macro they get an error that says "You are not allowed to edit this page." As I have said before, creating this page and loading the proper template by hand works just fine. I don't know if this is the proper avenue to have this question answered but any help would be appreciated.

Cameron

Groups in ACL are ignored

Just updated from 1.5.5a to 1.7.1. To be more precise, old wiki was on Windows server with IIS and CGI. Then I installed 1.7.1 on Linux machine with Apache and fastcgi. Copied ./data, removed cache, removed all old macros, parsers and themes, performed pages migration. I took wikiconfig.py from the new distro and updated it accordingly.

I have very tight security policy with lots of groups. Now after upgrade only users who are specified explicitly in acl_rights_before, acl_rights_default or in a page's acl get proper authorization. If user is the member of some group then he doesn't get authorized despite this group being mentioned in acl. Look like group membership is just ignored.

I've tried switching acl_hierarchic off, searched through this site, read CHANGES and MIGRATION documents, looked in the sources, but still can't find the cause of the problem.

  • (!) You likely missed the part of docs/CHANGES talking about page_*_regex configuration having changed. If you just need the usual "for English" behaviour, you can just delete all those regexes from wiki config. If you need to have it recognize something complex (like e.g. matching group page names for different languages), you have to read docs/CHANGES. -- ThomasWaldmann 2008-08-11 12:19:17

    • Well, I did really miss that part. But all the pages in my wiki have English names, so I didn't get any positive result after editing or disabling those regexes.
      • Do you have stopped the server and cleaned the old dict cache? You can verify as superuser using the SystemAdmin page if all works after you had restarted the server process. -- ReimarBauer 2008-08-11 14:29:00

        • Yes, I tried both /etc/init.d/apache2 stop/start and apache2ctl restart. Cleaned cache manually by removing everything from ./data/cache before server restart. On SystemAdmin page I can only see user accounts and list of attachments. -- AlexanderAgibalov

2008-08-12 05:49:07

  • Can you pastebin your wikiconfig.py? And please check if the timestamp of the pyc file is newer as the py file. I don't know what is wrong yet but it is easier to figure out if you meet us at chat.freenode.net #moin. -- ReimarBauer 2008-08-12 18:36:28

    • Here it is. I removed all the commented lines. .pyc file is recreated each time after I make changes in .py -- AlexanderAgibalov 2008-08-14 06:55:40