Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

WikiUsing

Passwords for pages

One can just set passwords for pages, without having a concept of 'user'.

Set passwords for pages by adding ?action=attr to the url. This gives you a form that lets you set view, edit and attr-edit passwords separately.

To set passwords for a whole page group, set them for the special page MyGroupName/GroupAttributes.

You can give several alternative passwords, separated by spaces. That way you can, for instance, make the edit passwords work as view password as well.

By giving the password @nopass, you can open access to a page (even when the whole group, for example, is protected).

Users

We also use the AuthUser feature, where we can have wiki 'users'. They are created by entries on the page AuthUser, and have their own passwords. They can also be collected into user groups. We currently use a group called @team.

  • to make a page accessible for a user, set the page password to 'id:username' instead of a normal page password
  • to make a page accessible for a user group, set the page password to '@groupname'

Wiki Admin

Page Groups

Make a new page group called MyGroupName by creating a link to [[MyGroupName/]], which is the same as [[MyGroupName/MyGroupName]]

Configuration stuff for a group goes in local/MyGroupName.php.

Attachments

We configure

    $EnableUpload = 1;                      # allow uploads
    $HandleAuth['upload'] = 'edit';         # accept edit password for uploads
    $UploadDirQuota = 100000000;            # 100MB
    $UploadExts['ecl'] = 'text/plain';      # allow uploading .ecl files

Files are stored in uploads/MyGroupName, as per default configuration.

For non-public groups we can disable direct http-access to the uploaded files by creating a .htaccess in uploads/MyGroupName

    Order Deny,Allow
    Deny from all

and configuring in local/MyGroupName.php

    $EnableDirectDownload = 0;

To add attachments, use markup

  • Attach:file.xy displays as text link, or inline (if image)
  • [[Attach:file.png]] display as link even if image
  • [[(Attach:)file.xy]] suppress Attach: text in the link

as long as the file has not been uploaded, the link goes to the upload page.

To replace an existing Attachment/uploaded file, append "?action=upload" manually to the URI for the page with the attachments, and upload a new version of the same file.

Clean URLs

We are implementing Clean URLs according to the first method (mod_rewrite with .htaccess in the same directory as pmwiki.php). I have also tried the mod_alias method successfully (changing httpd.conf), but that cannot be confined to a particular vhost. The .htaccess file (644 permissions) looks as follows:

# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine   On
# Define the rewrite base.
RewriteBase     /wiki
# Send requests without parameters to pmwiki.php.
RewriteRule     ^$      pmwiki.php      [L]
# Send requests for index.php to pmwiki.php.
RewriteRule     ^index\.php$    pmwiki.php      [L]
# Send requests to pmwiki.php, appending the query string part.
RewriteRule     ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1 [QSA,L]

the wiki directory is called .../httpdocs/wiki, and the necessary entry in wiki/local/config.php entry is

    $ScriptUrl = 'http://eclipseclp.org/wiki';

Upgrading PMWiki

Make a backup of ~/httpdocs/wiki first. Then get and unpack the new pmwiki:

    wget http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.89.tgz
    tar xfpz pmwiki-2.2.89.tgz
    chgrp -R psacln pmwiki-2.2.89

Also downloaded captcha.php from https://www.pmwiki.org/wiki/Cookbook/Captcha and put it in cookbook/ subdirectory.

Copy the following from the old directory:

    .htaccess    (the toplevel one with the rewrite rules)
    local        (but keep local/.htaccess from pmwiki distribution!)
    wiki.d
    uploads

Upgrade 2019 using pmwiki 2.2.112 (Feb 2019). 2.2.111 has some updates for apache 2.4. The php installed on the new server is 7.2.10 (see Plesk), which should work with pmwiki>=2.2.103 (our old one was 2.2.89).

Edit - History - Print - Recent Changes - Search
Page last modified on January 14, 2020, at 02:28 PM