Recent Changes in the PmWiki group   -   WikiHelp   -   Search hugo.alroe.dk:

This 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.

Basic PmWiki editing rules

Q I’m new to PmWiki, 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 WikiTrails) 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.

Q How do I include special characters on my wiki pages?

Use character codes to insert special characters, such as Copyright (©) and Trademark (® or ™) symbols, that don’t appear on your keyboard.

Q Why are separate lines of text in the markup combined into a single line on output?

PmWiki 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. However, an author can use the (:linebreaks:) directive to cause separate lines of markup text to be kept as separate lines in the output.

Q Can I just enter HTML directly?

By default (and by design), PmWiki 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 PmWikiPhilosophy and PmWiki:Audiences. Basically, Pm feels that enabling HTML markup within wiki pages in a collaborative environment has the effect of excluding some potential authors from being able to edit pages, as well as posing a number of display and security issues. However, a site administrator can use the Cookbook:EnableHTML recipe to enable the use of HTML markup directly in pages.

Tables

Q How do I create nice tables similar to Product X?

See tables and table directives.

Wiki Styles

Q Some of my colors aren’t working! For example, %color=#AAAAAA% works, but %color=#AA3333% doesn’t work. What’s wrong?

Be sure to use lowercase letters for rgb hex colors, otherwise PmWiki may mistake the color value for a WikiWord.

Page Directives

Q Can I get (:redirect:) to return a “moved permanently” (HTTP 301) status code?

Use (:redirect PageName status=301:).

Q Is there any way to prevent the “redirected from” message from showing at the top of the target page when I use (:redirect:)?

If you want to suppress the message…

  • in all cases, add add $PageRedirectFmt = ''; in your local/config.php
  • based on the destination/target of the redirect, add $PageRedirectFmt = ''; to a local/group.page.php or local/group.php file (see PmWiki.PerGroupCustomizations).
  • based on the origin/source of the redirect, add the following to your local/config.php
   if (@$_GET['from']) {
     $group = PageVar($_GET['from'], '$Group');
     if ($group == 'SomeGroup') $PageRedirectFmt = '';
   }
Example application: Replace ‘Some Group?’ with ‘Profiles’

Page History

Q Is 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 delete into the text area and click on the save and edit button. Select all the contents of the edit text area and paste the contents of the clipboard over them. Click on the save button. This will remove all of the page’s history up to the final save in which the pasted material is re-added.

Q How can I restrict viewing the page history to people with edit permission?

In the local/config.php file, set

$HandleAuth['diff'] = 'edit';

Page Lists

Q How can I configure my site to always exclude wiki-related pages from searches?

Try the following in your local/config.php file. See also Cookbook:SearchPatterns.

## Exclude Certain pages / groups from search results.
$SearchPatterns['default'][] = '!\\.(All)?Recent(Changes|Uploads|Comments)$!';
$SearchPatterns['default'][] = '!\\.Group(Print)?(Header|Footer|Attributes)$!';
$SearchPatterns['default'][] = '!\\.(Left|Right|Side)(Bar|Menu|Note)$!';
$SearchPatterns['default'][] = '!^Site\\.!';
$SearchPatterns['default'][] = '!^PmWiki\\.!';

If you add $SearchPatterns['default']... to exclude groups and pages from pagelist and search output, you can include the omitted pages by using “list=all” in the pagelist or search parameters.

Passwords Admin

Q There seems to be a default password. What is it?

There isn’t any valid password until you set one. PasswordsAdmin describes how to set one.

PmWiki comes “out of the box” with $DefaultPasswords[‘admin’] set to ‘*’. This doesn’t mean the password is an asterisk, it means that default admin password has to be something that encrypts to an asterisk. Since it’s impossible for the crypt() function to ever return a 1-character encrypted value, the admin password is effectively locked until the admin sets one in config.php.

Q How do I use passwd-formatted files (like .htpasswd) for authentication?

See AuthUser or Cookbook:UserAuth

Q 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?

For the sitewide edit password (in config.php), use ‘@_site_edit’. I haven’t tested this, but I think one can also use ‘@_site_admin’, ‘@_site_read’, ‘@_site_attr’, etc. for the other site-wide passwords set in config.php. ‘@admin’ is used to specify the site admin password.

Q How do I edit protect, say, all Recent Changes? pages?

(needs answer)

Internationalizations

Q If my wiki is internationalized by config.php, how do I revert a specific group to English?

Use $XLLangs = array('en'); in the group.php configuration file.

Custom Markup

Q How 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 $HTMLHeaderFmt array.

Troubleshooting

Q Why 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/.)

Q I’m suddenly getting messages like “Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied…” and Cannot acquire lockfile”… what’s wrong?

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 — PmWiki 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)

Q 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. Otherwise they will point to whatever group you happen to be viewing the sidebar in.
Also: Make sure you type SideBar with a capital B.

Q Why am I seeing “Warning: Cannot modify header information - headers already sent …” messages at the top of my page.

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 <?php or after the ?> in a local customization file. Double-check the file and make sure there aren’t any blank lines or spaces before the initial <?php. It’s often easiest and safest to eliminate any closing ?> altogether.

If the warning is appearing after some other warning or error message, then resolve the other error and this warning may go away.

Q Why is PmWiki 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 $EnableDiag=1; in local/config.php, run PmWiki using ?action=phpinfo, and verify that sessions are enabled and that the session.save_path has a reasonable value. Note that several versions of PHP under Windows require that a session_save_path be explicitly set (this can be done in the local/config.php file).

Q I edited config.php, but when I look at my wiki pages, all I see is “Parse error: parse error, unexpected T_VARIABLE in somefile on line number.

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.

Q 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).

Q Some of my posts are coming back with “403 Forbidden” errors or “Not Acceptable”? This happens with posts containing “wget”, “curl”, “file(“ or …

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”, and “file(“, although there are many others.

Since mod_security intercepts the requests and sends the “forbidden”
message before PmWiki ever gets a chance to run, it’s not a bug in PmWiki, and
there’s little that PmWiki 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 SecFilterEngine off in a .htaccess file.

Q I get the following message when attempting to upload an image, what do I do?

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1929 is not allowed to access /home/onscolre/public_html/pmwikiuploads/Photos owned by uid 33 in /home/onscolre/public_html/pmwiki/scripts/upload.php on line 198

PmWiki can’t process your request

?cannot move uploaded file to /home/onscolre/public_html/pmwikiuploads/Foundation Pupils in 1958?.jpeg

We are sorry for any inconvenience.

Access Keys

Q How can I change the keyboard shortcuts for editing and saving a page?

See PmWiki.AccessKeys.

PmWiki

pmwiki.org

(Edit SideBar)

Page last modified on June 02, 2007, at 10:32 PM - Edit Page