Newer
Older
ubixos-web / docroot / phpwiki / INSTALL
@reddawg reddawg on 29 Jun 2004 3 KB UbixOS Web Site
0. INSTALLATION

PhpWiki requires PHP version 3.0.9 or greater, since it uses the 
preg_*() family of functions.

Untar/gzip this file into the directory where you want it to live.
That's it.

bash$ gzip -d phpwiki-X.XX.tar.gz
bash$ tar -xvf phpwiki-X.XX.tar

To improve efficiency, edit lib/config.php and set the $ServerAddress
by hand; this will save a regexp call on every invocation.

Example:
Let's say you own the web server http://www.foo.com/. You untar in the
server's root directory; then you should be able to just go to your new
Wiki:

http://www.foo.com/phpwiki/index.php

If you configure your server to recognize index.php as the index of a
directory, you can just do:

http://www.foo.com/phpwiki/

If you get a blank page, PhpWiki tried to open the wrong DBM file
type, most likely. Edit the file lib/config.php and set DBM_FILE_TYPE
to the correct type for your system. 'gdbm' or 'db2' usually work.

1. CONFIGURATION

The first time you run this Wiki it will load a set of basic pages from
the pgsrc/ directory. These should be enough to get your Wiki started.

PhpWiki will create some DBM files in /tmp. They contain the pages of the
live site, archived pages, and some additional information.

If you don't want the DBM files to live in /tmp you must make sure the web
server can read/write to your chosen location.  It's probably a bad idea
to leave it in /tmp. (Again, edit lib/config.php). 

For example, you create a subdirectory called "pages" in the wiki
directory made when you untarred PhpWiki. Move the DBM files there.
The files are called: wikipagesdb, wikiarchivedb, wikilinksdb,
wikihottopicsdb, and wikihitcountdb. The files should already have proper
rights and owners, as they were created by the web server. Otherwise
change them accordingly so your web server can read/write the DBM
files. (Note you must be root to move files created by the web server).

Then you must ensure that the web server can access the "pages" directory
and can create new files in it. These can be achieved e.g. by doing

bash$ chown nobody:youraccount pages
bash$ chmod 755 pages

if your web server runs as user 'nobody'. This is necessary so that
the server can also create/set the lock file (PHP has a built in
locking mechanism for DBM file access).  Or if you're really lazy and
don't worry much about security:

bash$ chmod 777 pages

Note: this is insecure. The proper way is to let the directory be owned
by the web servers GUID and give it read and write access.



2. ALLOWING EMBEDDED HTML

PhpWiki ships with this featured disabled by default. According to CERT 
(http://www.cert.org/advisories/CA-2000-02.html) malicious users can embed
HTML in your pages that allow pure evil to happen. You can uncomment the 
"elseif" in lib/transform.php to allow embedded HTML; but you should NEVER
do this if your Wiki is publically accessible.


3. ETC

Installing PHP is beyond the scope of this document :-)
You should visit http://www.php.net/ if you don't have PHP.
Note that you should have the web server configured to allow index.php
as the root document of a directory.

This web application was written under PHP version 3.0.12 and 
the latest build of PHP4. It's tested under the following systems:

MySQL + Debian
mSQL + Red Hat 4.1
DBM or Postgresql on Red Hat 6.2

It reportedly works on Windows with Apache+PHP, which amazes me. 

That should be all. Send patches, bugs etc. to:

phpwiki-talk@lists.sourceforge.net

FIN