Version 22 of How to grow your own Wiki

Updated 2003-05-05 15:16:04

Purpose: A cookbook approach to creating a Wiki of your own.---- dlb: has anyone been successful in running the new (07-Nov-2000)VFS wikit via CGI ? -- if not, are there still older versions available ? I've been having a hell of a time getting wikit running as a cgi process , is there someone I can direct questions to ??

LV: Did you check the link above about Wikits and CGI? Did you put up a note on the Gripes about Wikit, or Wikit Problems, pages?

VPT: 17th Feb '02 - the current wikit.tkd runs as a cgi process (at least on Linux). I put the tclkit in /usr/bin since that was in the PATH in apache's environment (as displayed by the printenv cgi-bin script). I then put the wikit.tkd in the cgi-bin directory and set the permissions to rwx for the user apache runs as (I'm a lttle uncomfortable with having the write permission set but at least it only has the permissions of the apache user). Editing a page with Mozilla 0.9.8 fails with,

 [error] (26)Text file busy: exec of /var/www/cgi-bin/wikit.tkd failed

whilst editing with Netscape Communicator works. This failure mode has been reported before see wikit under CGI. Actually the edit succeeds although the browser reports an error. In any case it only fails if you are using Mozilla local to the server.


MDD: What would be really nice would be if someone would create a Starkit that combines tclhttpd and the wikit into one turnkey wiki server. Performance should be better, since you wouldn't have to use CGI.

11apr03 jcw - Yes, that would be cool, but it may need some work (either to make it properly keep state with repeated requests, or to make it work in a slave interp which gets re-inited on each access). Meanwhile, as of a month or so, code was added to wikit so it has its own simple-minded http server, courtesy of PS. I just looked, and see that for some reason it comes up in read-only mode, no idea why. Anyway, the command to make it work is:

    ./wikit.kit -httpd 8080

Or on Windows, I suppose you could do:

    tclkitsh wikit.kit -httpd 8080

Then you can access it as http://my.machine.name:8080/

5may03 MDD - Has anyone worked out how to get it working in writeable mode? If so, what's the trick?

LV what do you mean, writable mode? You want to write into the wikit.kit file itself? Or do you mean to create writable wikit.tkd data files?

MDD If you look above at jcw's comment, it currently comes up in read-only mode. That is, when you access the wiki via a remote browser, you can't edit the pages. How do you fix this?

LV: Good question. Here's what I tried - I made certain I ran the tclkit from a directory which was writable by anyone. I also made certain that the .tkd file that wikit expects was writable by anyone. However, it didn't appear to make a difference - still I am unable to edit pages.

Anyone else have ideas?

5may03 PS The trick is to finish the POST handler. Right now the wikit only supports GET requests. IIRC, you need about 15 to 30 lines of code to finish it, I just never got round to it.

Hint: POST data will come in multiple file readable events, you'll need to aggregate those (use the Content-Length header), before you call the request handler.


Note that logging goes to stdout (or is it stderr) so you should expect to redirect it if you want logs that you can monitor.

Also, the default wikit.kit content has some unfilled links (pages Starkit (10), Tclkit (11), Incr Tcl (12), Adding Help to Starkits (13)).


Category Wikit