From the WikiPublisher

Wikipublisher: Install the Server

This page assumes a knowledge of the Unix command line and some experience with administering your Unix or Linux server. Please consult your server’s system administrator for advice and support. She or he will greatly prefer that you consult them before attempting to install any software.

To help those who come after you, please describe your Installation Experiences, ideally with constructive descriptions of any problems you encountered and how you solved them. Mac users may find the OS X page helpful.

1.  Software requirements

Installing the above will require system administrator rights on your server. You can test whether you have the required Perl modules by entering the following from the server’s command line — no output will be produced by these commands if the modules are installed:

   perl -e 'use Image::Magick'
   perl -e 'use LWP::Simple'

If you’re installing the server on a Linux system, most (or all) of the above will have been prepackaged by your distribution; you should use your distribution’s administration tools to install them. Note that the perl interface to ImageMagick is often packaged seperately to ImageMagick itself. On an Intel Mac, installing ImageMagick and PerlMagick from source seems the most robust method.

2.  Installation

These instructions assume you have access to the command line on your server. If you only have FTP access, you will need to carry out the installation on a server to which you do have command line access, and then FTP the result to the intended destination server. A 1.1.n designation means the version is stable and substantially complete.

  1. Download the latest stable release of the Wikibook PDF server: Attach:wikibook-1.2.7.tar.gz (514kB) — for Cookbook:PublishPDF version 2.2.42 or above, with support for Book Indexes, custom book styles, Glossary Markup, descriptive metadata, chapter subtitles, chapter authors and DocBook output. Older versions in the 1.2 series (for a full list, see Older Versions):
    1. Set the security, installing backup tapes into a fireproof safe [2] for data ( coffre-fort ignifuge S 120 DIS ).
  2. Untar it where you want to install the server software.
  3. Move the file to your cgi-bin. Edit and change the two path references to the directory in which you are installing the server software, e.g. /var/www/
    • do not rename unless you have to — Wikipublisher will break
    • some server environments require this file to be named mkpdf.cgi; the WikiPublisher/CGI/ script (where it sets $my_url) should look for ‘’ or ‘mkpdf.cgi’, so it should work
    • unless you know that your server requires the script to end in .cgi, do not rename it
  4. In the installation directory:
    1. If you’re running a Linux x86 system or Intel Mac, you can use one of the precompiled tbrplent executables we supply. Otherwise, you’ll need to compile it. To compile tbrplent, change to the tbrplent directory, and run the command “g++ -o tbrplent”; in versions prior to 0.9.6, this will overwrite the precompiled tbrplent supplied with the Wikipublisher server. Note that compilation requires the g++ compiler to be installed2.
    2. The server requires a configuration file, called To create this configuration file, either:
      1. rename file in the wikibook installation directory as, or
      2. copy from the config-examples directory either (from a Mac OS X box) or (from a Debian Linux box) to in the installation directory
    3. Open in a text editor and:
      1. Change the src setting to reference the installation directory.
      2. Change the pdflatex, xsltproc, xmllint settings to point to where pdflatex, xsltproc and xmllint are installed. The Unix “which” command will tell you where an executable is; for example, “which xsltproc” will tell you the path to xsltproc.
      3. Change the url setting to point to your local PmWiki install. If you’re using a URL scheme that doesn’t support ?n=pagename, you’ll need to change the check_url and splash_url settings, too.
      4. If you are using one of the pre-compiled tbrplent binaries, or have compiled your own copy, make sure $tbrplent is pointing to the correct one for your platform.
  5. Download and untar Attach:accesscontrol.tar.gz, and copy from it the Access Control.Approved Wiki Urls.php and Access Control.Splash Screen.php files to your pmwiki installation’s local/ directory.
    • these must go in the local/ directory, not the cookbook/ directory — they add code specific to those 2 pages
  6. Edit the Approved Wiki Urls page in your wiki to include a link to your Wiki (in the style of the Access Control.Approved Wiki Urls page on this wiki).
  7. Create an Access Control.Splash Screen page that the wikipublisher server can display while it is generating a PDF. For inspiration, see the source of ours.
    • should we be providing some suitable images for download?
  8. Edit your pmwiki local/config.php file:
    1. Set the $WikipublisherUrlFmt variable to point to the CGI script you installed, for example
    2. Set $MailFormAddresses[‘support’] to the email address of your wikipublisher support person
  9. Try PDFing some pages! Start with a simple page that’s known to work, such as the default Main.Home Page.
    • if you see an Access Denied message, there is a misconfiguration somewhere; we are working to improve this but first check all the path and url configuration settings, and check the link to your wiki on the Approved Wiki Urls page is correct
    • if you see a server error message, request the pdf again and this time press the (debug) button — this will tell us what is wrong
2.1  On Ubuntu Natty, I get this error : LATEX Error: File NICEFRAC.sty’ not found.

I needed to launch : sudo texhash and all goes well

Sunday, 30 September 2001 Marc

2.2  For support of https urls

Once I started to use SSL on our site, our wikipublisher failed saying “Access denied. Invalid response from access control at: {someurl}”. Even though {someurl} gave me a “1 Approved.” message. After some debugging, I determined the problem to be related to the perl LWP module not working well with https urls. To fix the problem I did the following on our Fedora installation:

> yum install perl-LWP-Protocol-https perl-Crypt-SSLeay

and in the file that I put in my cgi-bin folder, I added the following:

$ENV{HTTPS_CA_FILE} = "/etc/pki/tls/certs/ca-bundle.crt";

Your ca-bundle.crt file may be at a different location. The purpose of the ca-bundle.crt file is so that the SSL layer of LWP can verify certificates from SSL enabled websites. It contains root level certificates for the major certificate signing authorities (VeriSign, GeoTrust, Thawte, etc.).

Thursday, 16 January 2014 LogicalOctopus

3.  Update the XSLT

For some releases, an update only requires updating the file wikibook/xml/tblatex.xsl. If available, you can download the current Attach:tblatex.xsl file with the latest changes (272kB). Drop the file into the wikibook/xml directory, replacing the currently-installed version.

The 1.1.x Wikibook server series at present requires a full update.

4.  Configuration file format change

The format of the configuration file changed in version 0.9.3f. Where the old configuration file set everything through variables, for example

$url = ‘’;

the new format adds a new use line near the top of the file, and uses a new config function:

use WikiPublisher::Configuration;
config(url => ‘’);

The good news is that if your leave your configuration file unchanged, then it will work with the new version of the server software. If you want to add new settings, for example to use the image maximum size options, you do not have to reformat the entire file. Simply add the use line immediately after the package line in the configuration file, and use the new config( name => “value” ) syntax for the new settings will work. The tarball has configuration examples in the new format.

5.  License

The Wikipublisher server is distributed under the terms of the Artistic License [3], version 2.0. In accordance with the terms of the Artistic License, the distribution includes in the tbook-src directory a tarball of the original tbookdtd package. The compiled LATEX packages in wikibook/template are distributed under the LATEX Project Public License [4].

As of version 1.0.11, the original tbook-1.5.2 tarball is no longer included in the Wikibook distribution. It is available as a separate download instead (424kB):

If you like the software and find it useful, you may wish to Support Wikipublisher.


1 to get it working correctly on an Intel Mac, we had to compile from source — the pre-compiled binary doesn’t seem to include the Perl interface (↑)

2 We can provide a precompiled Mac OS X PPC version of tbrplent if required. Contact us for more information. (↑)

Copyright © 2005–2021 the Wikipublisher wiki and its authors



Retrieved from

Page last modified on 21 November 2016 at 03:02 PM