[Pmwiki-users] PmWiki on Boa

Carlo Strozzi carlos
Wed Jul 30 12:18:56 CDT 2003

On Wed, Jul 30, 2003 at 09:59:57AM -0600, Patrick R. Michaud wrote:
> I agree, I think that PmWiki *should* be able to work with Boa and other
> lightweight servers!  So unless it proves unworkable, I'll definitely 
> introduce changes to make it workable!  I'll probably install Boa on one
> of my systems here and see what I can do to get it to work correctly.

If you are going to have a go at Boa, then note that it can only run
php as a CGI, not as embedded code. There are probably many ways to
accomplish the same results, but here is how I did it:

1) I use cgiwrap, so that pmwiki runs as whatever user-level account
   I like (let's say "goofy"), with much improved security I think.

2) Supposing your CGI scripts (including php4) are in /usr/lib/cgi-bin/ ,
   and that cgiwrap is configured to look for CGIs into ~goofy/cgi-bin/ ,
   here is a simple shell front-end to the whole movie :

$ cat ~goofy/cgi-bin/pmwiki.sh
if [ -n "$PATH_INFO" ]			# turn into QUERY_STRING
   QUERY_STRING="pagename=$(echo $PATH_INFO | sed 's,/,,;s,/,.,;s,\?,\&,')"
   export QUERY_STRING
export REDIRECT_STATUS=200		# needed to fool php4.
export PATH_INFO=/pmwiki.php
cd /home/goofy/cgi-bin/pmwiki		# set proper working directory.
exec /usr/lib/cgi-bin/php4 "$@"

And here's how pmwiki is installed in ~goofy/cgi-bin/pmwiki/ :

$ ls -al ~goofy/cgi-bin/pmwiki/
drwxr-sr-x    6 goofy    goofy        4096 Jul 30 16:17 .
drwxr-sr-x    3 goofy    goofy        4096 Jul 28 14:41 ..
-rw-r--r--    1 goofy    goofy       18009 Feb  7  2002 COPYING
drwxr-sr-x    2 goofy    goofy        4096 Jul 29 10:12 local
-rw-r--r--    1 goofy    goofy       26660 Jul 28 14:46 php.ini
-rw-r--r--    1 goofy    goofy        1037 Mar  4 07:35 pmwiki-50.gif
-rw-r--r--    1 goofy    goofy       15421 Jul 24  2002 pmwiki-50.psd
-rw-r--r--    1 goofy    goofy       39641 Jul 30 19:33 pmwiki.php
drwxr-sr-x    2 goofy    goofy        4096 Jul 30 00:13 scripts
lrwxrwxrwx    1 goofy    goofy          48 Jul 28 14:43 uploads -> /home/goofy/public_html/pmwiki/uploads
drwxr-s---    2 goofy    goofy        4096 Jul 30 00:14 wiki.d
drwxr-sr-x    2 goofy    goofy        4096 Jul 24 00:27 wikilib.d

Note how the "uploads" directory points at an area that is accessible
to the web server for reading. And note also the "php.ini" file, that
needs to be configured according to your tastes/needs. I think the
most important setting in it is:

doc_root = /home/goofy/cgi-bin/pmwiki

It just looks complicated, but it isn't really all that much :-)
Given the above setup, your URL to enter PmWiki will be:


For best reading please set the Courier font.
Freedom for Business: http://swpat.ffii.org

More information about the pmwiki-users mailing list