Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
FAQThis page will attempt to summarize some of the more commonly asked questions. The answers are on the corresponding pages (see link). If you have a question which isn't answered here, you can leave your question on the Questions page or search for documentation using the search facility. More documentation can be found on the documentation index page. IntroductionWhat is Pm Wiki? Pm Wiki is a wiki-based system for collaborative creation and maintenance of websites. See PmWiki. What can I do with it? Pm Wiki pages look and act like normal web pages, except they have an "Edit" link that makes it easy to modify existing pages and add new pages into the website, using basic editing rules. You do not need to know or use any HTML or CSS. Page editing can be left open to the public or restricted to small groups of authors. Feel free to experiment with the Text Formatting Rules in the "Wiki sandbox". The website you're currently viewing is built and maintained with Pm Wiki. What are the requirements? See the PmWiki requirements page. Where can I find documentation? See the documentation index page. How can I download Pm Wiki? See the download page. How do I install Pm Wiki? Instructions for installation are on the installation page. How do I get help with Pm Wiki? See Mailing lists and How to get assistance. Basic PmWiki editing rulesI'm new to Pm Wiki, where can I find some basic help for getting started? The Basic Editing page is a good start. From there, you can just follow the navigational links at the bottom of the page (they are called Wiki Trails) to the next pages, or to the Documentation Index page, which provides an outline style index of essential documentation pages, organized from basic to advanced. How do I include special characters such as Copyright (©) and Trademark (® or ™) on my wiki pages? See special characters on how to insert special characters that don't appear on your keyboard. Why are separate lines of text in the markup combined into a single line on output? Pm Wiki normally treats consecutive lines of text as being a paragraph, and merges and wraps lines together on output. This is consistent with most other wiki packages. An author can use the Can I just enter HTML directly? By default (and by design), Pm Wiki does not support the use of HTML elements in the editable markup for wiki pages. There are a number of reasons for this described in the PmWiki Philosophy and PmWiki:Audiences. Enabling HTML markup within wiki pages in a collaborative environment may exclude some potential authors from being able to edit pages, and pose a number of display and security issues. However, a site administrator can use the Cookbook:Enable HTML recipe to enable the use of HTML markup directly in pages. Where can I find more documentation? See the documentation index and the markup master index pages. Creating New Pages
How do I create a new page? Typing [[my new page]] will create a link to the new page. There's a lot you can do with double bracket links. Why do some new pages have a title with spaces like "Creating New Pages" and others end up with a Wiki Word-like title like "Creating New Pages"? The default page title is simply the name of page, which is normally stored as "Creating New Pages." However, you can override a page's title by using the LinksHow do I create a link that will open as a new window? Use the
How do I create a link that will open a new window, and configure that new window? This requires javascript. See Cookbook:PopupWindow. How do I place a mailing address in a page? Use the
The markup See also Cookbook:DeObMail for information on protecting email addresses from spammers. How can I enable links to other protocols, such as nntp:, ssh:, xmpp:, etc? How do I make a Wiki Word link to an external page instead of a Wiki Page? Use link markup. There are two formats: [[http://example.com/ | WikiWord]] [[WikiWord -> http://example.com/]] How do I find all of the pages that link to another page (i.e., backlinks)? In the wiki search form, use Use the (:pagelist link=SomePage list=all:) -- show all links to SomePage (:pagelist link={$FullName} list=all:) -- show all links to the current page What link schemes does Pm Wiki support? How do I open external links in a new window or mark them with an icon? How can I use an image as a link? Use [[Page| Attach:image.jpg ]] or [[ http://site | http://site/image.jpg ]] See Images#links ImagesIs it possible to link an image on Pm Wiki without using a fully qualified URL? Yes. For images that are attachments, the general format is Can I attach a client image file on Pm Wiki? Yes, see Uploads . How can I include a page from another group that contains an attached image? Include the page in the normal way, ie Why, if I put an image with rframe or rfloat and immediatly after that I open a new page section with ! the section title row is below the image instead of on the left side? Because the CSS for headings such as ! contains an element clear:both which forces this behaviour. Redefine the CSS locally if you want to stop this happening, but I think the bottom border (that underlines the heading) would need further re-definition. I just use bolding for the title, and 4 dashes below ---- to separate a new section, and it saves the effort of fiddling with the core definitions. Unlike the lframe and rframe directives, cframe does not fully honour the width setting. While the frame itself resizes to match the request, the enclosed image does not, and retains its original width. Effect is the same in IE and Fx. I've added an example beneath the standard example above. Is it possible to disallow all images? I already disabled uploads but I also want to disallow external images from being shown on my wiki pages. Yes, add to config.phpDisableMarkup('img'); $ImgExtPattern = "$^"; How can I make it so that when I place an image in a page, the block of text it is in is a <p> (paragraph) rather than a <div> (division)? If you just want it to happen for a single image (instead of all), then
try putting [==] http://www.pmwiki.org/pub/pmwiki/pmwiki-32.gif
Having Is there any way to use relative paths for images? See Cookbook:RelativeLinks and Is there a way to attach a BMP and have it display rather than link? Add to config.php the following line: Is there a way to have a table to the left or right of an image? Yes, see TableAndImage. UploadsWhen I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"? Use parentheses, as in Why can't I upload files of size more than 50kB to my newly installed Pm Wiki? Out of the box Pm Wiki limits the size of files to be uploaded to 50kB. Add
to your config.php to increase limit to 1MB (for example). See UploadsAdmin for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.
Why does my upload exit unexpectedly with "Incomplete file received"? You may be running out of space in a 'scratch' area, used either by Pm Wiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp. How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory. Use the Attach page action, and click on the delta symbol (Δ) shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not not authorized to upload, or the attach action has been commented out or is missing. See also available actions. How do I hide the "Attach:" for all attachments See Cookbook:AttachLinks, note that this does not currently work for How to avoid problems with non-ASCII characters in attachment names (i.e. "Zażółć geślą jaźń.doc")? See How can I link a file that have a 4-letter file extension such like 'abc.pptx'? How can I prevent others from using the url's of my images on their site TablesHow do I create a basic table? Tables are created via use of the double pipe character:
How do I create cell headers? Header cells can be created by placing ! as the first character of a cell. Note that these are table headers, not headings, so it doesn't extend to !!, !!!, etc.
How do I create an advanced table? See table directives My tables are by default centered. When I try to use '||align=left' they don't align left as expected. Use ||style="margin-left:0px;" instead. How can I specify the width of columns? You can define the widths via custom styles, see Cookbook:FormattingTables and And add in pub/css/local.css :
table.column td.col1 { width: 120px; } table.column td.col3 { width: 40px; } How can I display a double pipe "||" in cell text using basic table markup? Escape it with Table directivesCan I define table headers using the table directive markup? No, but you can with Cookbook:AdvancedTableDirectives. See Pm's reply to pending PITS:00535 Is it possible to do nested tables? Yes, if you nest simple tables inside advanced tables. See also Cookbook:AdvancedTableDirectives. Is it possible to add background images to tables and table cells? Yes, see Cookbook:BackgroundImages. Wiki Styles
Access KeysHow can I change the keyboard shortcuts for editing and saving a page? Page Directives Can I get Use Is there any way to prevent the "redirected from" message from showing at the top of the target page when I use From version 2.2.1 on, set in config.php Is there any method for redirecting to the equivalent page in a different group, i.e. from Bad Group?/thispage => Good Group?/thispage using similar markup to (:redirect Goodgroup.{Name}:)?
(:redirect Goodgroup.{$Name}:) works if you want to put it in one page.
If you want it to work for the entire group, put (:redirect Goodgroup.{*$Name}:) into Badgroup.Group Header? - however, that only works with pages that really exist in Goodgroup; if you visit a page in Badgroup without a corresponding page of the same name in Goodgroup, instead of being redirected to a nonexistant page, you get the redirect Directive at the top of the page.
With (:if exists Goodgroup.{*$Name}:)(:redirect Goodgroup.{*$Name}:)(:ifend:) in Badgroup.Group Header? you get redirected to Goodgroup.Name if it exists, otherwise you get Badgroup.Name without the bit of code displayed.
Include Other PagesWhat's the maximum number of includes that can exist in a page? My site seems to stop including after 48 includes. ( $MaxIncludes )
By default, Pm Wiki places a limit of 50 include directives for any given page, to prevent runaway infinite loops and other situations that might eat up server resources. (Two of these are Group Header and Group Footer.) The limit can be modified by the wiki administrator via the Is there any way to include from a group of pages without specifying by exact name, e.g. between Anchor X and Y from all pages named IF Class?-* ? This can be achieved using page lists. There appears to be a viewing issue when the included page contains the (:title:) directive. As of version 2.2.0, the last title in the page overrides previous ones. In future versions, this may be configurable, but for the moment, best is to place your (:title :) directive at the bottom of the page, after any includes. Conditional MarkupPage specific variablesIs there a variable like $LastModified, but which shows me the creation time? No, but you can create one in config.php. For instance: # add page variable {$PageCreationDate} in format yyyy-mm-dd $FmtPV['$PageCreationDate'] = 'strftime("%Y-%m-%d", $page["ctime"])'; If you like the same format that you define in config.php with $FmtPV['$Created'] = "strftime(\$GLOBALS['TimeFmt'], \$page['ctime'])"; Wiki GroupHow can I get rid of the 'Main' group in urls for pages pointing to Main? How can I limit the creation of new groups? See Cookbook:Limit Wiki Groups. Why doesn't [[St. Giles and St. James]] work as a link? (It doesn't display anything.) Because it contains periods, and destroys Pm Wiki's file structure, which saves pages as Group.PageName. Adding those periods disrupts this format. Links may only contain words. If you need a link precisely as shown, the page must be named eg St Giles And St James? then you can use the (:title:) directive to have the page's title appear with periods (:title St. Giles and St. James:). (Although modern US and UK grammar now tend to drop the period to simplify style). How can I delete a wiki group? Normally you can't, as this requires an admin with server-side access to delete the file that makes up the group's Recent Changes? page. But there is an option method of making it possible to delete Recent Changes? pages from within the wiki if the admin enables the code found on Cookbook:RecentChanges Deletion. How can I delete a wiki group's Group.Recent Changes? page? Normally you can't, as this requires an admin with server-side access to delete a file. But there is an optional method of making it possible to delete Recent Changes? pages from within the wiki if the admin enables the code found on Cookbook:RecentChanges Deletion. Group HeadersHow do I set one header for all pages/groups? The header for each page is controlled by the $GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader basepage={*$FullName}:)(:nl:)' . $GroupHeaderFmt; Note that single quotes must be used so that Any form of markup is valid in $GroupHeaderFmt .= "Global markup text here.";
Would this then work for site footers? $GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter basepage={*$FullName}:)(:nl:)' . $GroupFooterFmt; Wiki Trails
What's the difference between a PageList and a Wiki Trail?? The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a Wiki Trail? as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, Wiki Trails are simply specified via links on an "index" page and you can put previous-next navigation markup on each page. The two serve very different purposes. Wiki Trails are useful for specifying the pages in web feeds, for creating a "tour" through a predefined set of pages, and many other things. Page HistoryIs there a way to remove page history from page files? 1. Administrators can clean page histories using the Cookbook:ExpireDiff recipe. 2. Administrators with FTP file access can download individual pages from the wiki.d directory, open them in a text editor, manually remove history, and re-upload the files to wiki.d/ directory. Care must be exercised, when manually editing a page file, to preserve the minimum required elements of the page and avoid corrupting its contents. See PageFileFormat#creating. 3. Edit the page. Select all the contents of the edit text area and cut them to the clipboard. Enter How can I restrict viewing the page history In the local/config.php file, set $HandleAuth['diff'] = 'edit' ;
In case of this restriction is set up on a farm, and you want to allow it on a particular wiki, set in your local/config.php : $HandleAuth['diff'] = 'read' ;
PasswordsHow can I password protect all the pages and groups on my site? Do I really have to set passwords page by page, or group by group? Administrators can set passwords for the entire site by editing the config.php file; they don't have to set passwords for each page or group. For example, to set the entire site to be editable only by those who know an "edit" password, an administrator can add a line like the following to local/config.php: For more information about the password options that are available only to administrators, see PasswordsAdmin. I get http error 500 "Internal Server Error" when I try to log in. What's wrong? This can happen if the encrypted passwords are not created on the web server that hosts the Pm Wiki. Solution: Create the passwords on the system with the oldest PHP version and use them on all other systems. How can I create private groups for users, so that each user can edit pages in their group, but no one else (other than the admin) can? Administrators can use the AuthUser recipe and add the following few lines to their local/config.php file to set this up: $group = Fmt Page Name('$Group', $pagename); This automatically gives edit rights to a group to every user who has the same user name as the group name. How come when I switch to another wiki within a farm, I keep my same authorization? Pm Wiki uses PHP sessions to keep track of authentication/authorization information, and by default PHP sets things up such that all interactions with the same server are considered part of the same session. An easy way to fix this is to make sure each wiki is using a different cookie name for its session identifier. Near the top of one of the wiki's local/config.php files, before calling authuser or any other recipes, add a line like: session_name('XYZSESSID'); You can pick any alphanumeric name for XYZSESSID; for example, for the cs559-1 wiki you might choose session_name('CS 559 SESSID?');
This will keep the two wikis' sessions independent of each other. Deleting PagesDeleting Wiki Groups & Categories: Once I create a Group or Category, how can I get rid of that group or category? An admin can just remove the unwanted pages from wiki.d/ . Normally, doing it via the wiki doesn't resolve the problem, since it counts as an "update" which causes the Recent Changes? page to be re-created, but it is possible to modify the site's configuration to allow deletion of the group's Recent Changes? page -- see Cookbook:RecentChangesDeletion. PmWiki InstallationShould I rename pmwiki.php to index.php? Renaming pmwiki.php is not recommended. Instead, create an index.php file that contains this single line <?php include_once('pmwiki.php');
How do I make pmwiki.php the default page for a website? Create an index.php file that runs Pm Wiki from a subdirectory (pmwiki/ for example) and place it in the site's web document root (the main directory for the website). <?php chdir('pmwiki'); include_once('pmwiki.php');
Note: You will also need to explicitly set the How do I enable "Clean UR Ls?" that are shorter and look like paths to my wiki pages? Why does pmwiki.org appear to have a directory structure rather than "?n=pagename" in UR Ls?? See Cookbook:CleanUrls. Is it possible to move wiki.d to /tmp/persistent/foo/wiki.d (a new sourceforge rule)? Sourceforge suggests moving everything to /tmp/persistent/new-folder-of-your-choice/ and creating a symbolic link to the new folder on /tmp . It works -- see Cookbook:SourceForgeServers. How can I run Pm Wiki on a standalone (offline, portable) machine ? UpgradesHow can I determine what version of Pm Wiki I'm running now? See version - Determining and displaying the current version of Pm Wiki (pmwiki-2.2.71). How can I test a new version of Pm Wiki on my wiki without changing the prior version used by visitors? The easy way to do this is to install the new version in a separate directory, and for the new version set (in local/config.php): $WikiLibDirs = array(&$WikiDir, new PageStore('/path/to/existing/wiki.d/{$FullName}'), new PageStore('wikilib.d/{$FullName}')); This lets you test the new version using existing page content without impacting the existing site or risking modification of the pages. (Of course, any recipes or local customizations have to be installed in the new version as well.) Then, once you're comfortable that the new version seems to work as well as the old, it's safe to upgrade the old version (and one knows of any configuration or page changes that need to be made). Uploads AdministrationHow do I disable uploading of a certain type of file? Here's an example of what to add to your local/config.php file to disable uploading of .zip files: $UploadExtSize['zip'] = 0; # Disallow uploading .zip files.
How do I attach uploads to individual pages or the entire site, instead of organizing them by wiki group? Use the $UploadPrefixFmt = '/$FullName'; # per-page
$UploadPrefixFmt = ''; # site-wide
For Units are in bytes.
Is there a way to allow file names with Unicode or addtiional characters? Yes, see Where is the list of attachments stored? It is generated on the fly by the (:attachlist:) markup. How can I find orphaned or missing attachments See Cookbook:Attachlist enhanced How can I prevent hotlinking of my uploaded images See Cookbook:Prevent Hotlinking I have limited the max upload size to 8 MB in config.php, however only files smaller than 2MB can be uploaded. Check your php.ini for upload_max_filesize upload_max_filesize = 8M SecurityHow do I report a possible security vulnerability of Pm Wiki? Pm wrote about this in a post to pmwiki-users from September 2006. In a nutshell he differentiates two cases:
See his post mentioned above for details and rationals. What about the botnet security advisory at http://isc.sans.org/diary.php?storyid=1672? Sites that are running with PHP's register_globals setting set to "On" and versions of Pm Wiki prior to 2.1.21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP. The vulnerability can be closed by turning register_globals off, upgrading to Pm Wiki 2.1.21 or later, or upgrading to PHP versions 4.4.3 or 5.1.4. Wiki Vandalism
How do I stop pages being deleted, eg password protect a page from deletion? Use Cookbook:DeleteAction and password protect the page deletion action by adding or to require the edit or admin password respectively.
How do I stop pages being replaced with an empty (all spaces) page? Add how do I stop pages being completely replaced by an inane comment such as excellent site, great information, where the content cannot be blocked? Try using the newer automatic blocklists that pull information and IP addresses about known wiki defacers. (OR) Try using Cookbook:Captchas or Cookbook:Captcha (note these are different). (OR) Set an edit password, but make it publicly available on the Site.AuthForm template. How do I password protect all common pages in all groups such as recent changes, search, group header, group footer, and so on? Insert the following lines into your local/config.php file. Editing these pages then requires the admin password. ## Require admin password to edit RecentChanges (etc.) pages. if ($action=='edit' && preg_match('/\\.(Search|Group(Header|Footer)|(All)?RecentChanges)$/', $pagename)) { $DefaultPasswords['edit'] = crypt('secret phrase'); } Note that all Group Attributes? pages are protected by the attr password. Alternative: you can require 'admin' authentication for these pages: ## Require admin password to edit RecentChanges (etc.) pages. if ($action=='edit' && preg_match('(Search|Group(Header|Footer)|(All)?RecentChanges)', $pagename)) { $HandleAuth['edit'] = 'admin'; } How do I password protect the creation of new groups? See Cookbook:Limit Wiki Groups How do I password protect the creation of new pages? See Cookbook:Limit new pages in Wiki Groups How do I take a whitelist approach where users from known or trusted IP addresses can edit, and others require a password? Put these lines to local/config.php: ## Allow passwordless editing from own turf, pass for others. if ($action=='edit' && !preg_match("^90.68.", $_SERVER['REMOTE_ADDR']) ) { $DefaultPasswords['edit'] = crypt('foobar'); } Replace 90.68. with the preferred network prefix and foobar with the default password for others. How do I password protect page actions? See Passwords for setting in config.php
or
How to make a rule that allows only authors to edit their own wiki page in Profiles? group? Add this to your local/config.php if($group=='Profiles')
How do I moderate all postings? Enable PmWiki.Drafts
How do I make a read only wiki? In config.php set an "edit" password. How do I restrict access to uploaded attachments? See
Custom InterMapAre Inter Map names case sensitive? Yes, thus How can I achieve a localmap.txt mapping with the effect of Use the following: Pics: /somepathto/pics/
How can I define an Inter Map in PHP? Use the following: $LinkFunctions['PmWikiHome:'] = 'LinkIMap'; $IMap['PmWikiHome:'] = 'http://pmwiki.org/wiki/$1'; Custom MarkupHow can I embed Java Script? into a page's output? There are several ways to do this. The Cookbook:JavaScript recipe describes a simple means for embedding static Java Script? into web pages using custom markup. For editing Java Script? directly in wiki pages (which can pose various security risks), see the JavaScript-Editable recipe. For Java Script? that is to appear in headers or footers of pages, the skin template can be modified directly, or <script> statements can be inserted using the How would I create a markup ((:nodiscussion:)) that will set a page variable ({$HideDiscussion}) which can be used by (:if enabled HideDiscussion:) in .PageActions? Add the following section of code to your config.php SDV($HideDiscussion, 0); #define var name Markup('hideDiscussion', '<{$var}', '/\\(:nodiscussion:\\)/e', 'setHideDiscussion(true)'); function setHideDiscussion($val) { global $HideDiscussion; $HideDiscussion = $val; } This will enable the Pm Wiki only supports tool tips for external links, can I use custom markup to add tool tips to internal links? Yes, add the following custom markup to your config.php: Use the markup with internal links such as: See also Cookbook:LinkTitles. It appears that (.*?) does not match newlines in these functions, making the above example inoperable if the text to be wrappen in <em> contains new lines. If you include the "s" modifier on the regular expression then the dot (.) will match newlines. Thus your regular expression will be "/STUFF(.*?)/s". That s at the very end is what you are looking for. If you start getting into multi-line regexes you may be forced to look at the m option as well - let's anchors (^ and $) match not begin/end of strings but also begin/end of lines (i.e., right before/after a newline). How do I get started writing recipes and creating my own custom markup? InternationalizationsIf my wiki is internationalized by config.php, how do I revert a specific group to English? Use If my wiki is in English and I want just one page, or group, in Spanish do I say Yes, that is usually the best method. If you were doing this with many scattered pages, or with several languages, you might find it easier to maintain if you load the translations all in config.php like this: XL Page?('es','Pm Wiki Es.XL Page?');
XL Page?('fr','Pm Wiki Fr.XL Page?');
XL Page?('ru','Pm Wiki Ru.XL Page?');
Then in each group or page configuration file, you'd just use What does the first parameter of this function stand for? How can it be used? The XL Page? mechanism allows multiple sets of translations to be loaded, and the first parameter is used to distinguish them. For example, suppose I want to have translations for both normal French and "Canadian" French. Rather than maintain two entirely separate sets of pages, I could do: XL Page?('fr', 'Pm Wiki Fr.XL Page?'); XL Page?('fr-ca', 'Pm Wiki Fr Ca.XL Page?'); Pm Wiki Fr.XL Page? would contain all of the standard French translations, while Pm Wiki Fr CA.XL Page? would only need to contain "Canada-specific" translations -- i.e., those that are different from the ones in the French page. The first parameter distinguishes the two sets of translations.
In addition, a config.php script can use the and Pm Wiki will use only the 'fr' and 'en' translations (in that order), no matter how many translations have been loaded with XL Page?(). Tools for Pm Wiki LocalizationYou can help to localize Pm Wiki in your language in the original site: Local CustomizationsThere's no "config.php"; it's not even clear what a "local customisation file" is! The "sample-config.php" file in the "docs" folder, is given as an example. Copy it to the "local" folder and rename it to "config.php". You can then remove the "#" symbols or add other commands shown in the documentation. See also Group Customizations. Can I change the default page something other than Main.Home Page ( Yes, just set the $DefaultPage = 'ABC.StartPage';
How do I get the group / page name in a local configuration file (e.g. local/config.php)? Use the following markup in pmwiki-2.1.beta21 or newer: ## Get the group and page name $pagename = ResolvePageName($pagename); $page = PageVar($pagename, '$FullName'); $group = PageVar($pagename, '$Group'); $name = PageVar($pagename, '$Name'); Can I remove items from the wikilib.d folder on my site? Yes, the files in wikilib.d/ can be safely removed. They'll reappear again when you upgrade, however. How do I customize my own 404 error page for non-existent pages? To change the text of the message, try editing the Site.PageNotFound page. Is the order of customizations in config.php important? Are there certain things that should come before or after others in that file? Yes, the following has been recommended on the mailing list:
Note, each part is not required, but if your wiki needs it, this is the recommended order in config.php. Group CustomizationsHow can I apply CSS styles to a particular group or page? Simply create a pub/css/Group.css or pub/css/Group.Page.css file containing the custom CSS styles for that group or page. Why shouldn't passwords be set in group (or page) customization files? The reason for this advice is that per-group customization files are only loaded for the current page. So, if
and because the Group A?.php file wasn't loaded (we're looking at Main.Wiki Sandbox --> local/Main.php), there's no read password set. The same is true for page customization files. Isn't that processing order strange? Why not load per page configuration last (that is after global configuration an per group configuration)? Many times what we want to do is to enable a certain capability for a group of pages, but disable it on a specific page, as if it was never enabled. If the per-group config file is processed first, then it becomes very difficult/tedious for the per-page one to "undo" the effects of the per-group page. So, we load the per-page file before the per-group. If a per-page customization wants the per-group customizations to be performed first, it can use the techniques given in PmWiki.GroupCustomizations (using include_once() or setting SkinsHow do I change the Wiki's default name in the upper left corner of the Main Page? Put the following config.php $WikiTitle = 'My Wiki Site';
The docs/sample-config.php file has an example of changing the title. How can I embed Pm Wiki pages inside a web page? Source them through a PHP page, or place them in a frame. How do I change the font or background color of the hints block on the Edit Page? Add a CSS style to pub/css/local.css: Skin TemplatesHow do I customize the CSS styling of my Pm Wiki layout? See Skins for how to change the default Pm Wiki skin. See also Cookbook:Skins, where you will find pre-made templates you can use to customize the appearance of your site. You can also create a file called local.css in the pub/css/ directory and add CSS selectors there (this file gets automatically loaded if it exists). Or, styles can be added directly into a local customization file by using something like: $HTMLStylesFmt[] = '.foo { color:blue; }';
Where can the mentioned "translation table" be found for adding translated phrases? Is it possible to have the edit form in full page width, with no sidebar? If the sidebar is marked with Can I easily hide the Home Page title from the homepage? Yes, you can use in the wiki page either Web FeedsHow do I include text from the page (whole page, or first X characters) in the feed body? (note: markup NOT digested) function Markup Excerpt?($pagename) {
$page = Retrieve Auth Page?($pagename, 'read', false);
return substr(@$page['text'], 0, 200);
}
Q:Does this mean if I want to include the time in the rss title and "summary" to rss body I call $FeedFmt['rss']['item']['description'] = '$LastSummary'; $FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} @ $ItemISOTime';
How can I use the RSS <enclosure> tag for podcasting? For podcasting of mp3 files, simply attach an mp3 file to the page with the same name as the page (i.e., for a page named Podcast.Episode4, one would attach to that page a file named "Episode4.mp3"). The file is automatically picked up by ?action=rss and used as an enclosure. The set of potential enclosures is given by the $RSSEnclosureFmt array, thus $RSSEnclosureFmt = array('{$Name}.mp3', '{$Name}.wma', '{$Name}.ogg');
allows podcasting in mp3, wma, and ogg formats. How to add "summary" to the title in a rss feed (ie. with Add this line in you $FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : $LastModifiedSummary';
How to add "description" to the title in an rss feed, and summary to the body? Add these lines to your $FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : {$Description}';
$FeedFmt['rss']['item']['description'] = '$LastModifiedSummary';
NOTES:
Some of my password-protected pages aren't appearing in the feed... how do I work around this? From a similar question on the newsgroup, Pm's reply: The last time I checked, RSS and other syndication protocols didn't really have a well-established interface or mechanism for performing access control (i.e., authentication). As far as I know this is still the case. Pm Wiki's Web Feeds capability is built on top of pagelists, so it
could simply be that the The "downside" to setting You could also set if ($action == 'rss') This limits the ability to see the protected pages to RSS feeds; normal pagelists and searches wouldn't see them. Lastly, it's also possible to configure the webfeeds to obtain the authentication information from the url directly, as in: .../All Recent Changes?action=rss&authpw=secret
The big downside to this is that the cleartext password will end up traveling across the net with every RSS request, and may end up being recorded in Apache's access logs. How to add feed image? Add the following to local/config.php (this example is for $FeedFmt['rss']['feed']['image'] = " <title>Logo title</title> <link>http://example.com/</link> <url>http://example.com/images/logo.gif</url> <width>120</width> <height>60</height>"; Do not forget NOT to start with a '<' as there would be no <image> tag around this... See here.
How do I insert RSS news feeds into Pm Wiki pages? How can I specify default feed options in a configuration file instead of always placing them in the url? For example, if you want if ($action == 'rss') SDVA($_REQUEST, array( 'group' => 'News', 'order' => '-time', 'count' => 10)); Are there ways to let people easily subscribe to a feed? On some browsers (Mozilla Firefox), the visitor can see an orange RSS icon in the address bar, and subscribe to the feed by clicking on it. To enable the RSS icon, add this to config.php :$HTMLHeaderFmt['feedlinks'] = '<link rel="alternate" type="application/rss+xml" title="$WikiTitle" href="$ScriptUrl?n=Site.AllRecentChanges&action=rss" /> <link rel="alternate" type="application/atom+xml" title="$WikiTitle" href="$ScriptUrl?n=Site.AllRecentChanges&action=atom" />'; You can also add such a link, for example in your Side Bar?, Can I create an RSS feed for individual page histories? See Cookbook:PageFeed. How do I create a custom Feed Page? similar to Recent Changes? or All Recent Changes?, but with only certain groups or pages recorded? See Cookbook:CustomRecentChanges. In a nutshell, you'll declare a if (PageVar($pagename, '$Group')!='ForbiddenGroup') { $RecentChangesFmt['Site.MyFeedPage'] = '* [[{$FullName}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; } FAQTroubleshootingWhy am I seeing strange errors after upgrading? Make sure all of the files were updated, in particular pmwiki.php. This question sometimes arises when an administrator hasn't followed the advice, which used to be less prominent, on the installation and initial setup tasks pages and has renamed pmwiki.php instead of creating an index.php wrapper script. If you have renamed pmwiki.php to index.php, then the upgrade procedure won't have updated your index.php file. Delete the old version and create a wrapper script so it won't happen again. Sometimes an FTP or other copy program will fail to transfer all of the files properly. One way to check for this is by comparing file sizes. Be sure all of the files in the wikilib.d/ directory were also upgraded. Sometimes it's a good idea to simply delete the wikilib.d/ directory before upgrading. (Local copies of pages are stored in wiki.d/ and not wikilib.d/.) I'm suddenly getting messages like " Something (or someone) has changed the permissions on the wiki.d/.flock file or the wiki.d/ directory such that the webserver is no longer able to write the lockfile. The normal solution is to simply delete the .flock file from the wiki.d/ directory -- Pm Wiki will then create a new one. Also be sure to check the permissions on the wiki.d/ directory itself. (One can easily check and modify permissions of the wiki.d/ directory in FileZilla (open-source FTP app) by right-clicking on the file > File attributes) My links in the sidebar seem to be pointing to non-existent pages, even though I know I created the pages. Where are the pages? Links in the sidebar normally need to be qualified by a WikiGroup in order to work properly (use [[Group.Page]] instead of [[Page]]). Why am I seeing " If this is the first or only error message you're seeing, it's usually an indication that there are blank lines or spaces before the If the warning is appearing after some other warning or error message, then resolve the other error and this warning may go away. How do I make a PHP Warning about If you are seeing an error similar to this Warning: session_write_close() [function.session-write-close]: open(/some/filesystem/path/to/a/directory/sess_[...]) failed: No such file or directory (2) in /your/filesystem/path/to/pmwiki.php on line NNN Pm Wiki sometimes does session-tracking using PHP's session-handling functions. For session-tracking to work, some information needs to be written in a directory on the server. That directory needs to exist and be writable by the webserver software. For this example, the webserver software is configured to write sessions in this directory /some/filesystem/path/to/a/directory/
but the directory doesn't exist. The solution is to do at least one of these:
session_save_path('/home/someuser/tmp/sessions');
Why is Pm Wiki prompting me multiple times for a password I've already entered? Usually this is an indication that the browser isn't accepting cookies, or that PHP's session handling functions on the server aren't properly configured. If the browser is accepting cookies, then try setting I edited config.php, but when I look at my wiki pages, all I see is " You've made a mistake in writing the PHP that goes into the config.php file. The most common mistake that causes the T_VARIABLE error is forgetting the semi-colon (;) at the end of a line that you added. The line number and file named are where you should look for the mistake. Searches and pagelists stopped working after I upgraded -- no errors are reported, but links to other pages do not appear (or do not appear as they should) -- what gives? Be sure all of the files in the wikilib.d/ directory were also upgraded. In particular, it sounds as if the Site.Page List Templates page is either missing (if no links are displayed) or is an old version (if the links do not appear as they should). Allso make sure that read-permissions (attr) are set for the pages Site.Page List Templates and Site.Search. Some of my posts are coming back with "403 Forbidden" errors, "Not Acceptable", or "Internal Server Error". This happens with some posts but not others. Your webserver probably has mod_security enabled. The mod_security "feature" scans all incoming posts for forbidden words or phrases that might indicate someone is trying to hack the system, and if any of them are present then Apache returns the 403 Forbidden error. Common phrases that tend to trigger mod_security include "curl ", "wget", "file(", and "system(", although there are many others. Since mod_security intercepts the requests and sends the "forbidden"
message before Pm Wiki ever gets a chance to run, it's not a bug in Pm Wiki, and
there's little that Pm Wiki can do about it. Instead, one has to alter the
webserver configuration to disable mod_security or reconfigure it to allow
whatever word it is forbidding. Some sites may be able to disable mod_security
by placing I get the following message when attempting to upload an image, what do I do?
Your server is configured with PHP Safe Mode enabled. Configure your wiki to use a site-wide uploads prefix, then create the uploads/ directory manually and set 777 permissions on it (rather than letting Pm Wiki create the directory). I'm starting to see "Division by zero error in pmwiki.php..." on my site. What's wrong? It's a bug in Pm Wiki that occurs only with the tables markup and only for versions of PHP >= 4.4.6 or >= 5.2.0. Often it seems to occur "out of nowhere" because the server administrator has upgraded PHP. Try upgrading to a later version of Pm Wiki to remove the error, or try setting the following in local/config.php: I have to log in twice (two times) (2 times). -or- My password is not being required even though it should. -or- I changed the password but the old password is still active. -or- My config.php password is not over-riding my farmconfig.php password. It could happen if (farm)config.php, or an included recipe, directly calls the functions Cond Auth?(), or Retrieve Auth Page?(), Page Text Var?(), Page Var?() and possibly others, before defining all passwords and before including Auth User (if required). The order of config.php is very significant. Auth UserI get http error 500 "Internal Server Error" when I try to log in. What's wrong? This can happen if the encrypted passwords are not created on the web server that hosts the Pm Wiki. The crypt function changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1. This situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version. The same error occurs when you add encrypted passwords to local/config.php. Solution: Create the passwords on the system with the oldest PHP version and use them on all other systems. Can I specify authorization group memberships from with local/config.php? Yes -- put the group definition into the $AuthUser array (in config.php): $AuthUser['@editors'] = array('alice', 'carol', 'bob'); I'm running multiple wikis under the same domain name, and logins from one wiki are appearing on other wikis. Shouldn't they be independent? This is caused by the way that PHP treats sessions. See PmWiki.AuthUser#sessions for more details. Is there any way to record the time of the last login for each user when using Auth User? I need a way to look for stale accounts. Though every settings seem correct, authentication against LDAP is not working, and there is nothing in ldap log. What's wrong ? Be sure ldap php module is installed ( on debian apt-get install php(4|5)-ldap ; apache(2)ctl graceful ) The login form asks for username and password, but only password matters. Username can be left blank and it still signs in under the account. Is this intentional and if so, can I change it so that the username and password must both be entered? - X 1/18/07 Never mind I think this has something to do with using the admin password. I created a test account and it's working ok.
Make sure you are not entering the admin password when testing the account because, if the password is equal to the admin password, it will authenticate directly through the config.php file and skip any other system. Do note that even with Auth User activated you can still log in with a blank username and only entering the password. In that case any password you enter will be "accepted" but only passwords which authenticate in the given context will actually give you any authorization rights. Using this capability Auth User comfortably coexists with the default password-based system. If you want to require both username and password, then you need to set an admin id before including authuser.php: ## Define usernames and passwords. $AuthUser['carol'] = '$1$CknC8zAs$dC8z2vu3UvnIXMfOcGDON0'; ## Enable authentication based on username. include_once('scripts/authuser.php'); # $DefaultPasswords['admin'] = crypt('secret'); $DefaultPasswords['admin'] = 'id:carol'; A username and password will then be required before login is successful. Is there any way to hide IP addresses once someone has logged in so that registered users can keep their IP addresses invisible to everyone except administrators? - X 1/18/07 Not yet. Is there a way that people could self-register through Auth User? You can see Cookbook:AuthUserSignup for a recipe about this problem. I would like it that after I have Auth User turned and a user is authenticated to get on my site, that if I have a password put on a particular page or group that they don't get the Auth User form to show up (username and password), but only the typical field for password? Passwords AdminThere seems to be a default password. What is it? There isn't any valid password until you set one. Passwords admin describes how to set one. Pm Wiki comes "out of the box" with How do I use passwd-formatted files (like .htpasswd) for authentication? See AuthUser, Cookbook:HtpasswdForm or Cookbook:UserAuth. Is there anything I can enter in a Group Attributes? field to say 'same as the admin password'? If not, is there anything I can put into the config.php file to have the same effect? Enter '@lock' in Group Attributes??action=attr to require an admin password for that group. How do I edit protect, say, all Recent Changes? pages? How can I read password protect all pages in a group except the Home Page? using configuration files? As described in PmWiki.GroupCustomizations per-group or per-page configuration files should not be used for defining passwords. The reason is that per-group (or per-page) customization files are only loaded for the current page. So, if
and because the Group A?.php file wasn't loaded (we're looking at Main.Wiki Sandbox --> local/Main.php), there's no read password set. How can I password protect the creation of new pages? See Cookbook:LimitWikiGroups, Cookbook:NewGroupWarning, Cookbook:LimitNewPagesInWikiGroups. How do I change the password prompt screen? If your question is about how to make changes to that page... edit Site.AuthForm. If your question is about how to change which page you are sent to when prompted for a password, you might check out the Cookbook:CustomAuthForm for help. How do I change the prompt on the attributes ( Simply create a new page at Site.AttrForm?, and add the following line of code to
Note that this only changes the text above the password inputs on the attributes page, but doesn't change the inputs themselves - the inputs have to be dealt with separately. See Cookbook:CustomAttrForm for more info. I get http error 500 "Internal Server Error" when I try to log in. What's wrong? This can happen if the encrypted passwords are not created on the web server that hosts the Pm Wiki. Solution: Create the passwords on the system with the oldest PHP version and use them on all other systems. I only want users to have to create an 'edit' password, which is automatically used for their 'upload' & 'attr' passwords (without them having to set those independently). How do I do this? By setting
Design NotesWhy doesn't Pm Wiki use hierarchical / nested groups? It essentially comes down to figuring out how to handle page links between nested groups; if someone can figure out an obvious, intuitive way for authors to do that, then nested groups become plausible. See Design Notes and PmWiki:Hierarchical Groups. Why don't Pm Wiki's scripts have a closing ?> tag? All of Pm Wiki's scripts now omit the closing ?> tag. The tag is not required, and it avoids problems with unnoticed spaces or blank lines at the end of the file. Also, some file transfer protocols may change the newline character(s) in the file, which can also cause problems. See also the Instruction separation page in the PHP manual. Does Pm Wiki support WYSIWYG editing (or something like the FCK Editor?)? Short answer: Pm Wiki provides GUI buttons in a toolbar for common markups, but otherwise does not have WYSIWYG editing. For the reasons why, see PmWiki:WYSIWYG.
This page may have a more recent version on pmwiki.org: PmWiki:FAQ, and a talk page: PmWiki:FAQ-Talk. |