Wiki Perl module called CGI::Kwiki

Wiki Perl module called CGI::Kwiki

Posted by: rlparker
Posted on: 2003-12-07 19:23:00

Well, I'm feeling pretty stupid right now having thoroughly confused myself trying to work through an install dependancy issue with this pkg. perldiver.cgi reports all the requisite modules for the kwiki engine in Perl module called CGI::Kwiki (http://www.kwiki.org) are installed, and things seem to go very well at first with the install (as described on http://www.perl.com/pub/a/2003/05/14/kwiki.html?page=1), but it seems there is a remaining dependency issue.

when the index.cgi is run from the command line via telnet, I receive the error message:

Re: Wiki Perl module called CGI::Kwiki

Posted by: rlparker
Posted on: 2003-12-11 14:16:00

Just an update for anyone who has read this thread:

Thanks to Dreamhost tech support staff, certain of the requisite modules for Cgi-Kwiki have now been installed at Dreamhost and the beast works like a charm. The problem was the result of Cgi-Kwiki's dependance on a missing I18N module, which Dreamhost has now installed.

The end result is that the process of installing a pretty full featured wiki (it even includes a blog function!) on Dreamhost is now a three step process, in a telnet or ssh session, that requires no file transfers at all!:

1) create a directory in your web accessable space
2) CD into that directory and type "kwiki-install"
3) set that directory's permission *back* to 755 (the install program changes it to 775, which does not play well with Dreamhost)

Once these things are done, just go to the directory in your browser and, Tah Dah!, enjoy your wiki!

There are other option, modifications, etc that you can do to change or enhance the operation of your wiki, but all these steps are optional.

I hope this information is of use to some; if there is interest, I'll prepare a more full-featured tutotrial on using kwiki on dreamhost and put it on the web to be linked from this thread. Anyone have an interst in this? If so, just reply to this thread and I'll follow-up.

rlparker


Re: Wiki Perl module called CGI::Kwiki

Posted by: haggis
Posted on: 2003-12-11 19:26:00

Holy cow. Doesn't get much easier than that!

Re: Wiki Perl module called CGI::Kwiki

Posted by: haggis
Posted on: 2003-12-15 18:00:00

This was so convenient to set up. Wikis are strangely fun. I do have a question. Attempts to delete pages result in a lock failure. Apparently a known bug, with a fix, even. But, uh, where do I find edit.pm and database.pm to apply the fixes? Or at least look at them to see if what to do is obvious. Or do these have to be fixed by an admin? Here's the fix:

http://www.kwiki.org/index.cgi?PatchDeleteUnlockBug

In reply to:

Fixes a bug in version 0.18 where deleting fails due to an extra unlock call in the Edit.pm code. Also (perhaps unnecessarily) fixes the cgi failing due to extra unlocks in the first place.


--- Database.pm.orig    2003-10-28 09:02:31.000000000 -0500
+++ Database.pm 2003-10-28 09:36:51.000000000 -0500
@@ -36,6 +36,7 @@
sub unlock {
my ($self, $page_id) = @_;
my $lock_handle = $self->lock_handle;
+ return unless -e $lock_handle;
flock($lock_handle, LOCK_UN)
or die "Can't unlock $page_idn:$!";
close $lock_handle;
--- Edit.pm.orig 2003-08-25 16:45:05.000000000 -0400
+++ Edit.pm 2003-10-28 09:53:40.000000000 -0500
@@ -144,12 +144,11 @@
}

sub delete {
+ # note: locking still exists outside this in the save() sub
my ($self) = @_;
my $page_id = $self->cgi->page_id;
- $self->database->lock($page_id);
$self->database->delete($self->cgi->page_id);
$self->cgi->page_id('');
- $self->database->unlock($page_id);
}

1;

Re: Wiki Perl module called CGI::Kwiki

Posted by: haggis
Posted on: 2004-01-04 18:58:00

Support blew me off when I asked for the patch to be applied ("...doing custom software installs is a bit beyond the scope of our support. Unfortunately, so is patching your scripts")

Well, no argument there. For the life of me I can't find database.pm or edit.pm in the paths available to me after using the automated install. I suppose they are there somewhere I'm not looking, but I'm clueless. If someone could point me to the path I am happy (as mentioned previously) to attempt to patch them myself.



Re: Wiki Perl module called CGI::Kwiki

Posted by: ardco
Posted on: 2004-01-04 19:25:00

Not sure about after the install, but after initial untar, I found them here:

./CGI-Kwiki-0.18/lib/CGI/Kwiki/Database.pm

./CGI-Kwiki-0.18/lib/CGI/Kwiki/Edit.pm

Cheers,

BobS

Re: Wiki Perl module called CGI::Kwiki

Posted by: will
Posted on: 2004-01-04 23:33:00

The sitewide ones seem to be here:
andor: 11:32pm# locate Database.pm
/usr/share/perl/5.6.1/CGI/Kwiki/Database.pm
andor: 11:32pm# locate Edit.pm
/usr/share/perl/5.6.1/CGI/Kwiki/Edit.pm

If you're applying the patch to the version you've installed, it should be in the location mentioned by Bob. (I'd be careful about pasting it directly from the forum, as the spacing may get screwed up). You may need to use a "use lib" statement or something so that the program sees your version rather than ours.Edited by will on 01/04/04 11:40 PM (server time).

Re: Wiki Perl module called CGI::Kwiki

Posted by: haggis
Posted on: 2004-01-05 08:29:00

I thought I was asking for the site-wide one to be patched. As I understand it I did not install Kwiki itself, I used the already installed version's 'Kwiki-install' to create an instance of a kwiki, back-ended by the sitewide install.

Using the automated install does not unpack a distribution into a local directory. It appears to instead create a handful of wrapper files, a config file, and three .cgi files, all pointing back to the sitewide modules. That's what makes it so convenient to create multiple wiki's. As far as I can see I don't have any paths like ./CGI-Kwiki-0.18/lib/CGI/Kwiki/Database.pm

I'm at work but will triple-check those paths again when I get home.


Re: Wiki Perl module called CGI::Kwiki

Posted by: haggis
Posted on: 2004-01-07 14:42:00

Follow-up: Support has patched the file(s) and you can now delete a wiki page without an error. Tx!

Re: Wiki Perl module called CGI::Kwiki

Posted by: bronxred
Posted on: 2004-01-20 03:55:00

A kwiki tutorial would be MORE than insanely welcome, and much appreciated! I'd been trying to get a wiki working on my site for months, to no avail. Last night I ran across your posting and within an hour (I had to figure out how to SSH) I had three wikis up and running.

Anything you know about configuring special features, etc., would be greatly welcome.

Thanks!
J

PS...for anyone using Mac OS X who is unfamiliar with SSH, you don't need a special program to use it. Just fire up the Terminal and go. You'll need to know some basic UNIX commands to navigate around your directory structure, but you do NOT need to be an expert by any means.

* love / honor / glory *

Tags: stupidconfusedtelnetpkgerror messagesoftware errorwikihttpundefinedcgiperl module