[Home]UserHelp/Archive2

UseModWiki | UserHelp | RecentChanges | Preferences

This page contains old questions from the UserHelp page. Please do not add new questions to this page--use the UserHelp page instead.

Logging in from a new computer when you have no password? (2004-05-11)

I've a wiki account which I set up on one machine, deliberately blanking the password. I created the login because I want that the footer and the audit trail to display sensible names, and not because I want any sort of security policy (actually I really want no passwords to keep it simpler for non-savvy people).

But when I go to a new PC and go to the same page, well:

  1. there doesn't seem to be any obvious way to login, but then I discovered the 'action=login' way (can I add a'login' link to the to the footer somehow?)
  2. then I entered my numeric uid and no password (correctly) but then get 'login failed'
  3. if I go to the preferences screen then it already thinks I am a new user and does not give me the option to tell it "Hey, you already know me as 1001"

So what is the 'official' way to acquaint the wiki with your id when you are sitting in front of a previously-unused computer and have no password? Thanks!

Alexis ahuxley at eso dot org

You could go back to the other computer, where you first logged in. Set a password from there which you now can use on the new computer... But I think it would be easier to just get a new id and set your preferences once more. Set a password if you want to share your settings between different computers. You can also set a password later.

You can have different ids from different computers with the same user name.

Change $FooterNote for adding a link to the footer. You may also want to change $UserGotoBar instead.

HTH,

--MarkusLude


Specifying CSS file in address bar

If you look here: UseModWiki/NewFeatures you'll see that it says that CSS files can be specified in the address bar, but I can't get it to work. Everything I've tried (on my own server and this site) says invalid URL. How do I get that working?

A: Here is an example of using the CSS file on the address bar:

https://www.usemod.org/cgi-bin/wiki.pl?action=browse&id=RecentChanges&stylesheet=https://www.usemod.org/css/css2.css

It is generally more useful to put the stylesheet URL in one's preferences, however. You can also use the * character instead of a URL to force the wiki to not use a stylesheet. --CliffordAdams


Quotations/Citing?

Is there a TextFormattingRule? such that I get
<quote cite="http://lists.example.org/2002/01.html">We quite agree</quote>
With this (X)HTML-bit, one could do some nice CSS(2) rendering. I've seen that something like [[ text form other source ]] --source might be usual for quoting within Wikis.

Cheers! ~~~Debaser

A: No, there isn't a rule like that in UseModWiki. --CliffordAdams


Question (26/01/04)

Hi, I have a created a UseModWiki site with about 50 different pages which works fine. I need to convert all of these pages to static HTML to run on another machine as well which does not have WIKI installed.

How can I convert WIKI pages to static HTML, whilst maintaining the page links please?

Thanks in advance,

B. Stewart

Answer: The wiki software does not include a feature to export HTML. It may be possible to use other software to download all the pages and translate the links. See WikiSuggestions/Caching for some old discussion. --CliffordAdams


Question: LatexPatch

Hi, Has anyone got the LatexPatch working and if so, could they explain how it works? I've made the changes suggested on LatexPatch and it doesn't seem to have broken anything, so how do I put some latex into my pages?

Answer?

From a quick look, it seems that you either use:

I haven't tried the patch myself, but this is my best guess as to how it works. --CliffordAdams (who enjoyed TeX a long time ago in college).


question: Socket.pm error

I installed a wiki at www.utsuck.com/cgi/wiki.pl and the thing is whenever I edit a page I get an error

Can't locate Socket.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 14) line 1.

[Sat Jan 17 03:01:28 2004] wiki.pl: Can't locate Socket.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 14) line 1. BEGIN failed--compilation aborted at (eval 14) line 1.

Anyways if you check the site you can see. The thing is that even though I get the error, the page is still update with my edits. Any suggestions?

Andrew

Brief suggestion: Change $UseLookup to 0. If that doesn't work, find the lines in the code reading:

    eval 'use Socket; $iaddr = inet_aton($ENV{REMOTE_ADDR});'
         . '$rhost = gethostbyaddr($iaddr, AF_INET)';

...and change them to:

#    eval 'use Socket; $iaddr = inet_aton($ENV{REMOTE_ADDR});'
#        . '$rhost = gethostbyaddr($iaddr, AF_INET)';

...commenting out the offending code. --CliffordAdams


Hey I tried the two suggestions, but nothing. I get the error:

exec of /html/cgi/wiki.pl failed (No such file or directory)

  1. I tried to change the uselookup value to 0
  2. tried putting # and $ in front of suggested code, both resulted in same error.

Oops. That should have been a "#" character in front of both of the lines above. (I just fixed it.) Still, I don't see how it caused that error "(no such file or directory)". Unfortunately, I don't have time right now to look into this further--I'll try to consider it more later. --CliffordAdams

I appreciate your help, and ppl love my site, thx to you. BTW got my local wiki how do I insert links to run cached when I'm not online? They work on the first save, but the next edit results in a broken link--if I'm offline. I use safari.


question Jan 5-2004 - rss reader supporting wiki:diff ?

I use Sharp Reader now, and I tried a few readers (feed demon, etc.) I can't find a reader program which support "wiki:diff" fields in the rss output of UseModWiki. Is there any one? Or, is wiki:diff just for a future? -- GyPark

question Jan 3-2004 - lock files and file permissions?

I repeatedly get this error when I click on the standard "Preferences" link: Could not get user-ID lock at D:\html\users\****\****\cgi-bin\wiki.pl line 3681. [the ****s are site and directory names]

The server runs NT. I used the windows.zip file. Other than that, I have set things up just as related in the install docs.

Can you edit pages? It seems very strange to have a problem only with preferences. --CliffordAdams

I'm having the same problem under Apache. I can edit pages, but I get the "Could not get user-ID lock" error when I click on "Preferences"

question 1-2-2004 - file permissions & errors?

I'm not sure what happened, but I upgraded my OS X(10.2) to OS X(10.3) and ran into some problems with permissions. I figured I'd just change all the directories to 777, but I still get the following error:

cant write /Users/mho/Sites/testwik/keep/H/HomePage.kp: Permission denied at /Library/WebServer/CGI-Executables/wiki.pl line 2211.

Any suggestions? Thanks in advance.

Did you copy the line above exactly? Note the "testwik"--should it be "testwiki"? Also, even if you change the directory permissions, the individual file permissions may still matter. (The wiki does not remove/replace existing files--it just overwrites them.) Finally, if the problem is only with the keep directory, you could just remove it--the keep directory only stores old versions. --CliffordAdams

Questions 12-13-2003 - advanced admin/editor/user login schema and the others...

  1. where do you put new questions - on top or bottom? :-)
  2. anyway: is it possible to use the permission granting system described in the help (lock of the whole site + editor password for edit + lock of pages that can edit only admin) but in a way that: anybody can edit whatever = site is unlocked, editor can edit some locked pages, admin can do admin stuff?
  3. is the system of categories implemented at all? i don't see anything in doc or config.
  4. is there a plan to add _pager_ for big pages like Index and so on?
  5. is there a way of generating a page of all the authors?
  6. some wikis have index page sorted and sectioned in alphabetical order + the letter as a header, can UseMod do that?
  7. is there a way - special tag for a link on top or bottom of a page?
  8. i am looking for a way how to get some pages for offline editing on my palm. i did some research and it looks like the best way will be downloading the pages in text format (raw=1), offline edit, update then through web browser. anyone has set of scripts to do the download, creating a memo file for sync or a files for another editor on palm?
  9. is there any place where css files made especially for UseMod could be downloaded?
  10. i like UseMod and use it personally on http://biodynamika.cz , thank you for your good work!!
  11. i have moooooooooore questions :)

thank you

Petr Vanek

I wish I had time to answer all these questions, but I don't right now. (Most of the answers are "no, there isn't a way to do that".) Basically, UseModWiki is finished with development--no new features are planned right now. --CliffordAdams

Question - Diff_Log Trimming?

I just noticed my Diff_Log seems to have every entry ever made. Well... it seems to have the first entry and it's 4.5MB, so i'm guessing it's all there. It has Diff data that doesn't show up in the revisions or diff displays. Maintain function doesn't seem to trim it? Is it all chronological and can I trim it manually? Should this be happening? --MichaelHerman

Answer

You can simply delete the diff_log file at any time. The wiki does not ever read this file--it is only a log for recovery from disasters or vandalism. --CliffordAdams

Gorgeous! and Thanks! --mh


Question - Deleting a Wiki site from my FTP server

i made some stupid mistakes when creating my Wiki. i decided to start over from scratch, but i can't delete my database directory or upload anything to it (example: config file). i tried resetting the permissions but it won't let me do that either.

this turns into a problem because once i get it running the way i want, i plan on using it for a client backend for design projects. i'll have to delete entire Wikis every few weeks.

how can i resolve this? -- NinevoltPlus

Answer

It sounds like the files created by the wiki are owned by "nobody", and not by your regular login. Here is a simple CGI script that can remove directories. (Not tested, but slightly modified from a working script.)

#!/usr/bin/perl
$| = 1;
print "Content-type: text/html\n\n";
print "<html><pre>\n";
print "Output:\n";
print `rm -rf /path/to/wikidb`;
print "\n...done.\n</pre></html>\n";

Put the 7 lines above into a file in your cgi-bin directory, and replace /path/to/wikidb with your $DataDir setting. Make sure you really want to remove it before executing this script. Also, after executing it you might want to move or remove the script so you don't later remove a live wiki. --CliffordAdams


Question - allowing other multimediaformats

Hi is it possible to allow for example .swf or videoformats to be shown in the wiki, by changing some setting somewhere? -or modify Thanks in advance

Answer

It is not currently possible to display video or .swf in the wiki. If someone can send me (usemod@usemod.com) an example of HTML code to display video/SWF files, I could probably give you the needed changes to the wiki code. --CliffordAdams


Question - File Uploads

I've got the Admin password set, and "Upload" shows as an option next the Preferences link, so that part works. But when I try to upload I get an "Undefined subroutine CGI::upload" error. I'm wondering if I didn't set my $UploadDir? and $UploadUrl? variables correctly. Any thoughts? Here's what put for these variables, as per my ISP's path instructions:

$UploadDir? = '/usr/local/psa/home/vhosts/greenfx.net/httpdocs/asistwiki/asistdocs'; # Full path (like /foo/www/uploads) for files

$UploadUrl? = 'http://www.greenfx.net/asistwiki/asistdocs'; # Full URL (like http://foo.com/uploads)

Answer

Your CGI.pm library is too old. Upgrade it or see WikiBugs/FileUploadFails for a quick workaround. Your setttings look fine.--CliffordAdams


Question - Support for Chinese?

Is it possible for UseMod to display Chinese or other two(multi)-byte characters? When I paste Chinese into the edit field it displays, but upon saving it all turns to question marks.

Answer

It should be possible--I think some people are using Chinese wikis. You probably need to set the $HttpCharset to the name of the Chinese character set. If you don't set $HttpCharset, the browser doesn't know that the page is using the 2-byte charset, and probably defaults to an 8-bit set. --CliffordAdams


Question - Wiki Edit passwords?

After bouncing around wiki links till my head was bruised I still dont get passwords. I have a wiki with 3 pages page1,page2,page3. I fred, want to be able to edit all pages. but I want to allow bill access only to page1, jane access only to page2, and peter access to page3. Obviously if they create further pages underneath "their" page they should be able to edit them too. when I say access i really mean edit ability .I dont need to hide pages (is that possible?) I have played with wiki_config but dont seem to be doing something correct. help!!

Answer

This wiki does not support the kind of access control that you seem to want. While you can "lock" individual pages (which allows only a wiki admin to edit them), all "editors" can edit any other pages. The closest that you can get to your scenario is to follow these steps:

1. Give yourself a password in $AdminPass? (which allows editing all pages).
2. Add editor passwords to $EditPass for each editor (Bill, Jane, Peter). For example, you can add the following to your wiki config:
# Replace Bill's_pw (etc) with real passwords.
# Note that each password must *not* have any spaces.
$EditPass = qw(Bill's_pw Jane's_pw Peter's_pw);
...Then give each editor their password.
3. Lock any pages that you don't want the editors to be able to modify (like the home page and RecentChanges). (This will be much easier to do in 1.0 with the AdminToolbar?.)
4. Lock the entire wiki (LocalWiki:action=editlock&set=1). This means that only people with $AdminPass? or $EditPass passwords can edit.
5. If an editor misuses their ability (by editing someone else's pages without permission), remove their password from $EditPass.

UseModWiki does not support read-access control. (I prefer to leave this job to the webserver.) If you need more fine-grained access control you might want to look at [TWiki] which supports group-based access control (both read and edit). --CliffordAdams

I'd be happy with leaving the job to the web server if it were my own hands-on machine. But I have hosted web space (supanames.co.uk) and I don't think I have such control over the server. Or, if I do, I need a good tutorial. :-) Likewise, even if I'm capable of going through the Twiki learning process, I believe it uses things that aren't available to me, that's one of the reasons why I like UseMod. --John W


Question - Where is the AdminToolbar??

How do I become Admin of my Wiki?

Answer

After you set the $AdminPass?, go to the Preferences page (follow the link on the ordinary toolbar). On the Preferences page you will see a new entry field for Administrator Password (this only shows up if $AdminPass? is not ''). Type the password into that field, and when you save the preferences the next screen will say "User has administrative abilities". (The "login" and "newlogin" actions are not related to administrative access.) --CliffordAdams

Thanks. My problem was, that I set a $DataDir and the $AdminPass? in wiki.pl but the latter has to be set in $DataDir/config then. (Everybody knowing/guessing the $DataDir can read these passwords then?)

You can just delete the line which says "$AdminPass? = '<password>';" from your config file. Not all settings need to be in the config file--if a setting is not in the config file then the wiki.pl setting will be used. Also, I do not recommend putting the $DataDir inside your publically-accessible webspace directory. (The $DataDir should not be accessible from the web.) If you need to do this anyway, I recommend using the .htaccess file or similar mechanism to make it unreadable from the web. (If someone can read the $DataDir/users files, they could get the copy of the admin password that is stored in the user preference file.)

For protection against local users (on the same system), you can try "chmod o-rx /your/datadir" (replace "/your/datadir" with your real $DataDir value). (If that doesn't work, do "chmod o+rx /your/datadir" to restore the permissions.) --CliffordAdams


Question - Wiki relative interlinks?

I've tried a number of things, read docs etc but still cant work out how or if wiki can use relative links. [absolute link] thats fine but id like it to refer to its own site using relative linking. [../anotherpage] ie without all the http://stuff this would spirit the user away to /newbie/anotherpage

Answer

You can't really use relative links. (You could use [http:../anotherpage], but this will confuse some browsers as it is invalid.) The best solution is probably to create an InterWiki entry (in the "intermap" file) like the following:

Newbie http://hawthorn.csse.monash.edu.au/newbie/

...and then make links like this: Newbie:anotherpage. --CliffordAdams

Also, 1.0 has the Local:anotherpage or LocalWiki:anotherpage option built in. -- MikeCastle

Question - Deleting profiles?

Hey, what is the proper method of deleting profiles/users?

Answer

First, you must know your own UserID. Then you can log in, e.g. /wiki.pl?action=login, then go to Preferences, blank out UserName? and SetPassword?. Save and you've made it.

Also, in 1.0 the wiki administrator can run LocalWiki:action=trimusers which removes any user preference file that does not have a username, password, admin password, or stylesheet setting. After running trimusers, you will probably want to set $StartUID? to the recommended value so that no deleted UID numbers are reused. --CliffordAdams


Question - MagicContent

Hi, I've just got usemodwiki up and running on my home PC, (windows XP, ActiveState? Perl, Apache) and am trying to get the WikiPatches/MagicContent patch to work. Most of the commands work fine in the magicline but the Category command doesn't. I followed the instructions for modifying PrintPageList? in wiki.pl, and if I click on a page title it still does a search and returns the right pages (does this use the same code?), but the Content command still doesn't work, all it appears to do is make the text at the bottom of the page bigger. Also, if I set $text (in the Category package of the patch) to some random string, this appears on the page as you would expect and the text at the bottom of the page is back to its normal size. I don't know much about perl and am completely baffled. Help? Thanks, Cxx

Answer

You might want to double check where you have put the code that calls MagicContentMaker?->MakeSection? in relation to the call to WikiToHTML.

Some of the Magic Commands (including Category and WantedPages?) trash the contents of $Text('text') passed to WikiToHTML and maybe other stuff as well. You should make sure WikiToHTML is called before the call to MagicContentMaker?->MakeSection?.

I encountered this problem when I did my enhancement to this patch - so if you happened to use an early posting of my suggestion it might be my fault :-( If so, the latest version of the code will fix things. --DavidClaughton.

Have now got it working fine, will put details on WikiPatches/MagicContent if anyone's having similar problems.


Question - Edit the header

hi, how can I add for example SandBox at the head of the page ?

thx for answers

Answer

You can change the $UserGotoBar setting to add links to the top (and bottom) of each page. The $UserGotoBar setting is raw HTML, so you can link to any page. For example:

$UserGotoBar = '<a href="https://www.usemod.org/cgi-bin/wiki.pl?SandBox">SandBox</a>';
...would add a link to SandBox. (Change the URL for your own wiki.) You could also add more than one link, like:
$UserGotoBar = '<a href="https://www.usemod.org/cgi-bin/wiki.pl?SandBox">SandBox</a> | ' .
               '<a href="https://www.usemod.org/cgi-bin/wiki.pl?PageTwo">PageTwo</a> | ' .
               '<a href="http://www.yahoo.com/">Go to Yahoo!</a>';
...would create a link bar with links to SandBox, PageTwo?, and [Yahoo!]. --CliffordAdams

Question - Free Links

Hi, I've been trying to get free links to work, but it ain't happening. Was this feature available in version .90? Also, on perhaps a related note, I note that there is a check at the start of wiki.pl for the "Use Config" variable and a config file. I have Use Config set, but I don't have a config file. I didn't see anything about a config file here, but I may have missed something. My hope is that free links is something I might be able to configure in this file, but until I know more about the file, I can't say. Any pointers would be appreciated. --RandyNovick

Answer: Free links were available in 0.90, and are enabled by setting $FreeLinks to 1. The wiki package that you downloaded contains a sample "config" file that you can copy to your $DataDir and edit there. --CliffordAdams


Question - Many Wikis, One Site

I would like (for various reasons) to create many wikis in one account. Is such a thing possible with UseMod, or does it by default use a single DB? Is there a different kind of wiki that allows this? --Jessica

UseModWiki does not directly support many wikis, but it is easy to just copy the "wiki.pl" file to a new name and change the $DataDir to another directory. (You will also want to set the wiki name to be different--see the INSTALL directions for details.) I use this method to support several wikis on usemod.com. --CliffordAdams


Question - File Permissions

My usemod wiki files have all had their permissions changed by my server's owner, thinking it would fix certain things he'd broken in the past.

Now my wiki is having terrible problems. I've chmoded things back to what looks like sensible settings - but I'm still having problems locking files for new users and for editing pages.

What file permissions should I have on the files, especially within the data directory? My site is at www.clickoldham.com if you need to look at it. (and yeah, I know my css needs fixing)

-- Richard Kirkcaldy

Were only the permissions changed (and not the owner of the files)? If the files are owned by one user, and the CGI script runs as another one, it can cause problems. (In this case I could send you a short script to copy the files with the right owner.)

If the owner is correct, I would next try removing all temporary files, including the temp directory and the pageidx file (if it exists). The wiki will recreate them as needed. If you still have problems, it would be useful to see the output of "ls -la" run in your wiki's data directory. --CliffordAdams

The owner of the files was changed from nobody to my username - scripts create files owned by nobody on the server.

I've tried removing temp, that didn't help.

drwxrwxrwx   6 clickold clickold     4096 Feb  5 23:53 .
drwxr-xr-x   7 clickold clickold     4096 Feb  4 14:29 ..
-rw-rw-rw-   1 clickold clickold    11990 Jan 29 15:44 diff_log
drwxr-xr-x   9 clickold clickold     4096 Jan 29 15:37 keep
-rw-rw-rw-   1 clickold clickold       44 Jan 28 23:43 maintain
drwxrwxrwx  14 clickold clickold     4096 Jan 29 15:31 page
-rw-rw-rw-   1 clickold clickold     3936 Jan 29 15:44 rclog
drwxr-xr-x   3 99       nobody       4096 Feb  5 23:53 temp

drwxrwxrwx  12 clickold clickold     4096 Jan 28 23:27 user

OK--I think the best way to solve the problem is for all the wiki files to be owned by "nobody". Fortunately, this is pretty easy to do by copying the files within a CGI script. Here is an example script:

#!/usr/bin/perl
print "Content-Type: text/plain\n\n";
# The quotes below are back-quotes (below ~ on most (US) keyboards)
print `cp -R /big/dom/xusemod/olddb /big/dom/xusemod/newdb`;
print "done.\n";

You will need to change the directory names from /big/dom/xusemod/olddb and /big/dom/xusemod/newdb to your existing (old) directory and a new directory name (which should *not* exist before running the script). Then execute the script as a CGI script (put it in your cgi-bin directory, change permissions, then go to its URL in a web browser). The result should be a new DB directory in which all the files are owned by "nobody". --CliffordAdams


Hi, i installed a wiki on my site http://www.planet-hamburg.de. When i finish editing and press save i got an error "404 page not found". Any idea ? - Peter 2003-19-01

Unfortunately, I don't have any idea of what would cause that problem. Do you get the same 404 error if you press preview? Also, do you get an error if you try a search (using the "Search:" line at the bottom of the home page)? Can you save the user preferences (using the Preferences link)? --CliffordAdams


Question - HTTP 500 error (permissions)

I got usemod up and running on our site as far as the homepage shows up, I can call the "edit this page" screen and so on. But when I say "Save" for example or call the "Preferences" screen I only get a HTTP 500 internal server error. Any idea what's wrong? -- MickSchmidt?

Answer

Given by myself a day later, so if anybody is interested ...

While it's fine if one has a specific user for ftp to upload stuff to the webserver for security reasons ... one should still keep in mind that the webserver itself usually runs under a different account. And if the mywikidb directory belongs to the ftp user and the webserver user has no write access it can't create any files there ...

Giving rights for the webuser for the wikidb and ... magic! ;-)


Directory Change, wiki broken

Hi, I had a wiki installation that used the same directory for the Wiki Db-path and the CGI. I also put in a http-refresh that forwarded a call of /wiki/ to wiki.wiki.pl .

Now I had to move the CGI to /cgi-bin/wiki/ while I guess the wiki-DB should stay at /wiki/ (or is it safe to put in in the cgi-directory?)

I (think I did ;) did change the reqired paths etc. in the wiki.p�l and in the config-file.

When I save a changed wiki-page now I get a directory-view of the /wiki/directory instead of the refreshed page,

So how do I convince wiki to call the refreshed page?

The wikidb is at http://carpe.com/wiki/ the wiki.pl at www.carpe.com/cgi-bin/wiki/wiki.pl

Thanks

OliverG?, 2002-10-23

Answer

You should use your web-server's url rewrite mechanism instead of http-refresh. http refresh is probably not passing the parameters to the cgi and there is a bug (actually they call it standard compliance) with Perl's CGI implementation where POST redirect does not work. -- ManpreetSingh [10/23]

Question

Well, ok, HOW do I do this? I am a writer, not a programmer ;)

(The Wiki Installation is OK now, cause they allowed CGI in all directories again, but now the forward sometimes does not work.)

OliverG?, 2002-12-5

I don't know much about URL rewriting, but WikiPatches/URLRewrite looks like it might be useful. I don't recommend URL-rewriting for UseModWiki, since I am not certain it deals correctly with caching for all browsers, but I think some sites have made it work. --CliffordAdams


Question

the underscore character doesn't show when using in a wiki-link. beh_fo0 appears as [beh fo0]? in dbl brackets. sticking a nowiki tag in there breaks the entire link. Since my CSS takes colors in liew of underline on a link, the underscore is necessary. How should i go about this? -- MonstoBrukes?, 10-24-2002

Answer

The code that does this transformation is in all GetXXXLink? subroutines. The line

<;;pre>

      $name =~ s/_/ /g;
</pre>

needs to be changed to

#      $name =~ s/_/ /g;

or be removed altogether. Note that it is an untested solution -- ManpreetSingh

This will probably work for that user, but it may also cause some spaces in links to display as _ characters. (This behavior is probably not what most people want.) --CliffordAdams


Question

Using 'diff' on a Win32 install

I've got win32 version of apache with activeperl {http://www.activestate.com} running on WinXP? pro... for personal use only. usemod is up but without diff, as there's no 'diff' windows command. I installed a perl diff module with craploads of features, but since i'm no perl scripter, have been unable to use it instead of a plain 'diff' command.

Suggestions? (08-23-02) -- MonstoBrukes?

See UseModWiki/DiffForWindows for some options. --CliffordAdams


Answer (no question)

Don't know where to post this. I have brand new patched french versions based on UseMod-0.92, on which I've done the following :

As of today, these patched french versions are now available on Internet. A Working wiki site is on http://mkfs.freesurf.fr However, cookies are not availables, so it doesn't work so well. Another prototype site is on http://cmic.freeshell.org/wiki.pl . Fully functional !

For any doc and download, see my Wiki page on http://mkfs.free.fr/wiki.

Updated on 2003-02-12 by cmic@caramail.com


Problem / Question

Adding a new WikiWord = NewPage?, then using preview, and following the previewed link to build the NewPage? is dangerous because
  1. you may forget to go back and save the previewed page, or
  2. on using the browser back button to return to the previewed page the text being eddited in the <textarea> has reverted to the original text losing your changes.
Can anyone suggest a patch to "disable" the links in the preview area?

I do not plan on adding such a patch, since the links are an important part of previewd text. The next release (1.0) should allow separate CSS styling of previewed pages (perhaps with a different background color), which may solve your problem. --CliffordAdams

Question

Can I link via an image (a la <a href="blahblah"><img src="foo.png"></a>)?

''Not in the current version. It's not easy to think of syntax for that either; perhaps something like

[http://example.com/foo.png http://example.net/blah A picture of foo]
''would emit
<a href="http://example.net/blah"><img src="http://example.com/foo.png" alt="A picture of foo"></a>.

Sounds good to me, shame the existing syntax doesn't work now, viz [https://www.usemod.org/].

Question

I installed UseModWiki on a server, and the wiki.pl runs slowly. What's the hardware requirements for Version 0.92?
give us a clue .. what OS (and file system), what web server, what perl and version, are you serving files off network or local disk, what network software, what server software/hardware?
Some people have run 0.92 on old 80486 systems, but I recommend something slightly faster. The wiki has no hardware requirements of its own--if you can run a webserver and Perl 5 then it will probably work. --CliffordAdams

Question

I just installed UseMod. The installation was relatively easy and I got it working within an hour. However, I would like to allow a group of editors to edit all documents to prevent outsiders from damaging the contents of the wiki.

I read on the AdminFeatures page, that I can edit-lock the whole wiki and give editor access to those I want to be able to make any changes.

Where do I specify the editor password?

Answer

First, set the $EditPass variable to the editor password(s) that you want to use. For example, $EditPass = "wikipass"; (If you want to allow more than one password, separate them with spaces like $EditPass = "wikipassone wikipasstwo wikipassthree"; One advantage of multiple passwords is that you can give semi-trusted users a different password than the fully-trusted users.)

Due to a bug in version 0.92, you will also need to set the $AdminPass before your users will be able to enter an admin password. (The 0.92 code will not display the "Administrator Password" part of the form unless $AdminPass is non-empty. It should also check $EditPass, but it currently doesn't.)

Next, to lock the wiki, set $EditAllowed to 0, like $EditAllowed = 0; (You can also use one of the admin actions to lock the wiki.)

Finally, each editor will need to visit the Preferences page, and type their editor password into the "Administrator Password" field. If this password matches the $EditPass setting, they should see "User has editor abilities." when they save their preferences. Note that the password is saved (not a flag), so if you change the $EditPass setting the users will need to enter the new password.

If you have any questions, please feel free to email me (see my user page). --CliffordAdams


Questions

My installation is at http://www.carpe.com/wiki/

  1. On your HomePage, select "Edit the text of this page". But don't edit.
  2. Instead, go to the URL address box on the browser, and replace "HomePage" with "RecentChanges" (or "Recent_Changes" if that's your configured page name), so it reads "... action=edit&id=RecentChanges"
  3. Press "Enter" to activate the link.
  4. Put a comment in, like "Check here for recent action".
  5. Select "Save". -- JerryMuelver

      WikiWithCascadingStyleSheet may help

Thanks OliverG?


Question

How do I lock my wiki for everybody except the machines on my local network?

I tried installing the UseMod wiki on a webserver, and so far it worked. However, the server is accessible from the outside. I would like to have the wiki writeable ONLY for people on the local network. The ban list seems to assume that I only want to ban a few IPs, but I want it the other way around: banning the world and only letting in a few selected people.

In the future I may want to set it up so that at least part of the wiki is at least viewable from the outside, but another part cannot even be seen from the outside.

I am sure that these things are very easy to do, but I have searched this site for over an hour and have not found a way. Probably I am overlooking something very basic. Who can help?--branko

Answer

This needs to be done at the webserver configuration end, not at the Wiki end. Consult your webserver's documentation on how to do that. The facility does not exist in UseMod. A simple patch could make the UseMod code do checks like that too, but again, it's the wrong point for where to do this kind of access control. -- ManpreetSingh

Questions reg MultilingualWiki

Considering that most multilingual sites may not be very large (compared to WikiPedia) what is the best strategy with path to the files? Wikipedia has apearently their different languages separated on subdomains.

I run german, english and French for a wiki on www.eekma.org/wiki/ with the same special topic, elephants. Most files will be identical but in the the two langauges, and of course interlingua crosslinked. The database as such could theoretically be seperatad, or in the same mapping structure, although they will remain at the same server, for sure. (I had to answer some of my questions myself later, in Italics)

- What is the advantages or disadvantages to mix respectively separate the databases? - Must there be two pearlscripts running in the cgi-bin mapp? - or is it possible to run both on one? - In what way is the speed affected in the two cases?

- If they have to be divided in two, what may be integrated? RecentChanges, HomePage? - can I put the path to the same directory (accepting "shared" bilingual files) or must they be separated? - If I use two programs will it be enough to be logged in once or does one have to login on both? (Obviously not, since the name of the cookie must be different)

If they are in the same structure a probem will apear with words which are identically written in German and English, can this be override in any way?

Such files could of course be bilingual...

As for me, I see no other way then to run two different scripts and with two different directory areas...--Dan Koehl

As far as I know, no other site has tried to have two different scripts sharing the same page directory. I was hoping to make this an option eventually, and I think it would not be very hard to do, but I haven't looked at the relevant code recently. --CliffordAdams

And Ps, how do I configure the lines in the $UserGotoBar = "here?"; ( I have tried to do html links there (like between different languages on the wiki) but nothing except a short text string works for me? What are the possibilties? -- Dan

The UserGotoBar should be raw HTML, not interpreted in any way. Perhaps you could post an example of what you tried? --CliffordAdams

I tried something like this:

This wiki belongs to <a href="http://www.eekma.org" target="top">EEKMA</a>

It's possible that the problem was with the quotes. Here is what I would try:

$UserGotoBar = 'This wiki belongs to <a href="http://www.eekma.org" target="top">EEKMA</a>';

...note the single quotes surrounding the HTML that you want to insert. --CliffordAdams

) Thanks Clifford, now its working!

Regarding my question above about having two different scripts sharing the same page directory. With the present code what will happen? Will there be conflicts? Will pages be deleted? Or, didnt anyone try? I find it worth to consider as a alterantive when you do want to keepe a wiki multilingual, and still not separate the files and the material into different directories, which means pages with identical names would automtaically be multilingual. If I try this now, moving all files to one directory, and ponting all perlscripts to this directory, can anything go wrong, will material be destroyed? (Or do I think wrong, creating unnessesary problems since theres much better always seperating directoris?) Dan Koehl

There should not be a problem with two scripts sharing the same page directory, as long as they also share the same temporary and lock directories. The easiest way to do this would be to share the same $DataDir, without using a "config" file in the $DataDir. (Or you could use a config file which contains only the settings that are the same for all the shared wikis.) Each separate wiki could then add a line to DoWikiRequest to load its own configuration file with local settings like:

English Wiki:

sub DoWikiRequest {
  do "/some/directory/en_config";

French Wiki:

sub DoWikiRequest {
  do "/some/directory/fr_config";

For the next release (after 0.92) I added a new configuration variable $ConfigFile? (which by default points to "$DataDir/config") to make changes like this a little easier. (In the future you can just change this setting for each wiki to have different configuration files.) --CliffordAdams

Question: action= takes no action

With UseMod 0.92 under Perl 5.6.1 and 5.8.0, our statements involving action=version, action=login, etc., do nothing. I've copied & pasted statements from the edited pages of UseMod wiki sites where "action=version" works, pasted them into mine, and had no luck. Such statements are displayed without processing the square-brackets or the text they surround. In case it matters, hyperlinks do work. What have I missed? TIA!

I need more information to figure this out. Could you copy here the exact statements that are not working? --CliffordAdams

This also occurs in UseMod 1.0 against Perl 5.8.0. I create a new, empty wiki page, and paste into it the source of contents of the the UseModWiki "System" page, which contains several cool "action=" statements. After doing so, the new page is *displayed* like this:

BULLET OPENBRACKET UseModQUESTION?:action=login login CLOSEBRACKET - Login as known user

BULLET OPENBRACKET UseModQUESTION?:action=newlogin newlogin CLOSEBRACKET - Login as new user

BULLET OPENBRACKET UseModQUESTION?:action=editprefs editprefs CLOSEBRACKET - Edit user-preferences

... and so on, where I have put WORDS here in place of the symbols that are displayed. So my installation of Perl must be missing something, but I don't know what. Perhaps my Apache server's config isn't? :-) Its logfile is clear, however.

Serving this very generic configuration from a RH 9.0 Linux pentium box, using the perl & apache that comes with the install, produces the same effect.

TIA, again!


Request for Suggestions

How to build an eBook Wiki

Pages not valid HTML

Checking the pages from my wiki (AND UseMod: like [RecentChanges] follow the link) for html validation gives a lot of errors bacause of the: "edit&id=" tags.

Does anyone know what I can correct in the code so it gets accpeted as Valid HTML4? Dan Koehl

Yes. You can fix the markup rules. Just be aware that this is a lot of work, and usually displays the same. -- AlexSchroeder.

File suffix

Is it possible to get the dynamic html pages renamed to shtml so server side includes can be used? If its ok, which places in the code do I have to change?

Reply: I presume you want to use server side includes (SSI) on wiki pages. I don't think a renaming approach would work, but you might be able to do something with local configuration (like .htaccess in Apache) to make the cgi output also be processed for SSI statements. --CliffordAdams


Invalid UserID 113

Moving a wiki to a new server, and setting it up from scratch, trying to set preferences, I'm getting Invalid UserID 113 error. What would be the source of this? Other functions are working fine -- Recent Changes, diff, edit pages, etc. Config is Freelinks only. -- JerryMuelver Answer: -- It was a cookie problem, new site trying to access old site's cookie. I deleted all the old cookies, and Set Preferences worked just fine. -- JerryMuelver


=== Could not create /.....=== Hi, have a wiki on www.dasgruenewiki.netfirms.com/cgi-bin/wiki.pl but every time i go to the page the following messang appear : Why ? The directory is correct on the Server Greetings from Germany Michael

Isn't this trying to save your wiki pages to the root directory where you're running the perl script? Am new at this, so it's only a guess, but as nobody else has given you an answer, try changing the $DataDir variable in your perl script (wiki.pl). Presumably there's somewhere on the server where you would put normal html files - try setting $DataDir to that. You can then shove a config file in this directory so you don't need to alter the .pl file again. (I think...feel free to correct me if this is rubbish!)


Installation Problem Question (Naive - hopefully!)

I bought QuickiWiki? 2 days ago. Today I downloaded UseModeWiki?, primarily (at this stage) in order to use Free Links. Have not Apache on my disk (because I am a beginner and at this stage wil be lucky to use Wiki locally)

Was following installation instruction but do not get the thing running. Do I really need Apache? By the way couldn't found "htdocs" where to put wiki.gif into. For 1 second prompt is opened, then closed. Browser cannot find page. What could have went wrong? -Mark-

You will need some kind of webserver software on your system to use UseModWiki. (The "htdocs" folder is generally created when you install the webserver software.) Apache is the most-used webserver for UseModWiki, but several people have also used Microsoft's IIS software. I'm presuming that you are using a Windows system--in that case see UseModWiki/InstallWindows for some specific instructions that may be helpful. --CliffordAdams


Hello, I've been learning about UseModWiki this week while setting up a knowledge-base for a group of people. One thing that I just can't seem to get working is the external CSS support. I have hacked inline styles into the code as a result. Where is the .CSS file to reside to make the script/browser aware of it? I have tried putting the .CSS in the data subdirectory as well as in the cgi-bin. No luck for some reason. Using Apache, on Windows 2000. --Marko

The CSS file should reside in your regular web-space, as if it was a .html file. For example, if your $StyleSheet is set to "http://www.mydomain.com/wiki.css", and your webspace is in C:/users/mydomain/htdocs, then the "wiki.css" file should be put in the C:/users/mydomain/htdocs directory. --CliffordAdams


Thanks for the new version!

Edit limitation, textarea truncated

Anybody run into a problem with truncated text in the 1.0 wiki? When I edit an existing wiki and add more text than fits into the window, the text is truncated and does not show up. It seems like there is a limit to the amount of text that can be added. I looked thru the settings many times, but must be missing something. Please let me know if you have an answer! Thanks, [elly] (hate to go back to .92 cuz of this). 9/16/03

09/17/03 - I have found it is not browser or OS specific, nor wiki 1.0 specific. I had moved the scripts to a new server and it appears to be related to the new server which is Apache 2.0, perl 5.80 on RH9.0. Looked at LimitRequest? directives but that did not seem to be it (size being sent is smaller than the compiled or configured limits). --elly

09/17/03 - I spent all day working on this problem and found that it is an issue with the mod_perl rpm that is installed by default with RedHat-9 and there is no available upgrade/fix in rpm available yet. Instead of compiling another version of mod_perl/apache, I removed the reference to the mod_perl module in the httpd.conf and it will now save > 8190 bytes. I am surprised there are not more people running into this. -elly


Upload browsing

Q: Is there a way to review the files uploaded with version 1.0? Let's say I have 30 new images to write up content about, but I've forgotten which ones I did, or lost track of where I was in the list I was uploading. Is there anyway through the wiki to find out? I suppose I can alway browse the directory through the web browser, but I was hoping for an in-wiki solution. Thanks. -- MikeCastle

A: There is no way to do this within the wiki. (The upload feature was a last-minute addition with minimal functionality.) --CliffordAdams

A: Maybe WikiPatches/DirView can help you. --BernhardZechmann


File uploading

Q: Hello, I want users to be able to upload files and modify wiki page to create links to these uploaded files. Is there anyway I can do it? Thanks. -- Kyle

You can do this with the file uploading feature--see UseModWiki/NewFeatures for some (minimal) documentation to get started. --CliffordAdams


Question - CSS

Have got a wiki up and running and can change some elements of its appearance using an external .css file. Can't seem to change the colour of the main heading though. How do you do it? Anyone fancy donating some example .css files for their wikis that I can have a look at, I've never used them before.Cheers, Cxx.


Problem -Passwords

After using a wiki for a few days i want to add some admin rights. Ive added a password in $AdminPass? = # Set to non-blank to enable password(s)

signed up as a new user and entered the password http:....../wiki.pl?action=editlinks gives : This operation is restricted to administrators only...

Ive deleted the cookie and tried the same thing with both a new name and an existing one.

How do i debug this? Ive set a password in $AdminPass?


Environment Questions

I am helping out my local soccer club with their website, and my understanding is their site is hosted, and they have approx 25mb of space. Won't know final details for a couple of weeks.

1a) Is it possible to run a wiki when you do not have actual access to the Server (except FTP) only some webspace??

1b) If as per 1a it is possible, do I have to ask the hosting site for anything special. Looks like they are running Apache, but not sure.

1c) Do I need any special files, only the hosting site can provide? Files that will allow the wikki to be processed correcly by their server?

2) UseMod looks like it uses flatfiles as a database, which is why I am looking at it, as I can't install a DB in webspace. I do not think it will cause a problem, but has anybody else had problems.

I have searched for the details, but they all assume you know about CGI, PHP, etc, and how they interact with the server. I apologise for the newbie questions, but if I can set up a wikki for the club it will save many hours work for all the voluntary members and let team managers upload results etc.

Thank You John

Answer

The main thing that you need is to be able to use "CGI scripts". Your hosting provider should be able to tell you whether you can use "CGI scripts" or not. Many inexpensive web hosts do not allow CGI scripts because they can use more resources than simple web sites.

You should not need any special files. In a few cases, it may help to rename the "wiki.pl" file to "wiki.cgi" before uploading it to the server (using FTP). --CliffordAdams


Question - Uploading binary files

(2003-10-14) I've recently downloaded UseMod wiki because I was very interested in its upload feature. However, it doesn't quite work as well as I was hoping.

UseMod is installed on a Windows XP SP1 system with Apache2. When I upload a binary file, however, somehow all 'linebreaks' get converted to Windows format. That is, all 0A bytes get replaces with 0A0D (or 0D0A, I'm not very good at that stuff :-) ). What can I do about this? Should I tweak some Apache setting? Is there anything else I can do?

Thanks a lot in advance --OnnoBroekmans

Answer

I did some research on my own, and I found a solution. The !SaveUpload? function in wiki.pl seems to contain a bug - well, in any case the ActivePerl FAQ for Windows states that, in order to handle binary files, one should call binmode before writing to a file. Otherwise, linebreaks characters will be messed up in those binary files. Since uploading files only makes sense with binary files, I suggest the following change: --OnnoBroekmans

sub SaveUpload { # Line nr. 4920


  my ($filename, $printFilename, $uploadFilehandle);

...

  $uploadFilehandle = $q->upload('file');
  open UPLOADFILE, ">$UploadDir$filename";
  binmode UPLOADFILE;                        # <----- THIS LINE IS ADDED
  while (<$uploadFilehandle>) { print UPLOADFILE; }
  close UPLOADFILE;
...
}


Question - How to do user / inline CSS?

That is, with an xml object (eg <foo><bar>hello</bar></foo>) placed in the text, and with the styles in wiki.css, usemod escaped the xml so it appeared as text rather than 'styled'. <nowiki> doesn't help.

Answer

See 'allowing html and javascript' at WikiSuggestions/Html.

Question - Upgrading from 0.92 to 1.0

Are there any gotchas for the upgrade process from 0.92 to 1.0?

There shouldn't be. If you were using a separate "config" file, all you need to do is change the $DataDir setting in the 1.0 script. The default settings of the new 1.0 options were chosen to be compatible with 0.92. (Changing the $NewFS setting to 1 can be tricky, but this is optional.) I still recommmend making a full backup of your wiki just in case, however. --CliffordAdams

Question - I don't see changes on the first page when logging in again

When I change the first page and save the changes, I see the new page. When I reopen the website, the changes are gone.

Answer

Check your HomePage setting the data/config. If it contains spaces, for example, you'll see this behaviour. I know I did, anyway, and I was stumped for an hour or so :-)

Question - Files won't upload, although no error thrown

I recently had UseModWiki 1.0 installed on W2K, with latest ActivePerl version, and IIS. I've been reading all I could find about the upload feature and possible fixes, but couldn't find a thing related to what I experience: Upload feature seems to work, at least the interface doesn't throw any error, but the file is simply not uploaded. When I drop the file manually in the folder, the upload:file.ext syntax does link to the file though. I have no Perl experience at all to troubleshoot this, sorry about it ;-) --VinceBaker

Your answer is here WikiBugs/UploadOnWindowsNeedsBinmode --MarkButler

Sorry Mark, I should have stated that I already made that change, there are several pages refering to it. I triple-checked it but sadly, it still doesn't work. /me puzzled --VinceBaker

Humm, when I did upload code for myself I had lots of error messages to see if the file create etc succeeded. I am not sure if the same is true here. Best next guess is that you need to look at where the default locations are for upload and make sure that the user can write to it. Normally this is not the case as it can be a security hole. --MarkButler

I probably did something wrong the first time I defined access to the upload directory. I removed the share and the directory, and redo the whole thing on the server:

 Create a new directory
 Right click, Sharing... / Web Sharing / Share this folder
 Access Permissions: Read
 Application Permissions: Scripts
That works perfectly now. Thks. --VinceBaker

Question - Inserting items into the wiki from the command line

I'm not sure whether this should have gone in developer questions, sorry if it's wrong.

I have bunch of text files in a directory structure, and I am in the process of wiki-ising them all, from these files I have produced a new bunch of files which are formated in wikicode. The only thing I have left to do is to somehow shove them into the database.

I tried to do this. perl index.cgi title=Test&oldtime=1070050017&oldconflict=0&text=This%0Ais%20a%0Atest&summary=Test%20test&Save=Save

This results in:-

9658
9659
9660
9661
9662
# Content-Type: text/html; charset=ISO-8859-1

<H2>Invalid URL.</H2></body></html>

is what I'm trying to do impossible, if not, where am I going wrong?

Answer

What I was doing is of course very silly when you realise that & will end the command.

perl index.cgi "title=Test&oldtime=1070050017&oldconflict=0&text=This%0Ais%20a%0Atest&summary=Test%20test&Save=Save" works fine, but should be run from the same user as the database is stored as to prevent permission denied style problems.


Question - How do I change the name of a wiki page

I've installed UseMod 1.0 and want to be able to change a name of a page, automatically updating all links back to that page. The only way I see to change a name is to make a new page with the name I want, and track down and alter all the linkbacks to the old named page. That will leave me with an orphan page, and it takes a relatively long time. Is there a better way?

Answer

If you set up an administrator password (see AdminFeatures), you can use the "editlinks" feature (using a link like LocalWiki:action=editlinks which works if you are an admin). On the editlinks page, you can enter the following command:

=OldPageName=NewPageName?

...which will rename OldPageName to NewPageName? (case sensitive!) throughout the wiki. (The linkbacks will be changed if the checkbox "Substitute text for rename" is checked.) The editlinks action will also (by default) edit the RecentChanges list to use the new name. --CliffordAdams


Question - When I try open my wiki.pl at localhost then windows ask for download that file. Why?

(wxp pro sp1, iis5.1, usemod10, ActivePerl 5.6.1.635). Help!.

juanmampurl@NOSPAMhotmail.com.

Thanks.

Answer (preliminary)

It sounds like your IIS installation isn't recognizing that wiki.pl is a CGI script. Visit UseModWiki/InstallWindows for some tips on using the wiki with IIS.



UseModWiki | UserHelp | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 6, 2023 8:22 pm by MarkusLude (diff)
Search: