]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Changed occurances of *php3 to *php.
[SourceForge/phpwiki.git] / INSTALL
1 0. INSTALLATION
2
3 PhpWiki requires PHP version 3.0.9 or greater, since it uses the 
4 preg_*() family of functions.
5
6 Untar/gzip this file into the directory where you want it to live.
7 That's it. To improve efficiency, edit lib/config.php and set the
8 $ServerAddress by hand; this will save a regexp call on every invocation.
9
10 bash$ gzip -d phpwiki-X.XX.tar.gz
11 bash$ tar xvf phpwiki-X.XX.tar
12
13 Let's say you own the web server http://www.foo.com/. You untar in the
14 server's root directory; then you should be able to just go to your new
15 Wiki:
16
17 http://www.foo.com/wiki/index.php
18
19 If you configure your server to recognize index.php as the index of a
20 directory, you can just do:
21
22 http://www.foo.com/wiki/
23
24
25 1. CONFIGURATION
26
27 The first time you run this Wiki it will load a set of basic pages from
28 the pgsrc/ directory. These should be enough to get your Wiki started!
29
30 PhpWiki will create some DBM files in /tmp. They contain the pages of the
31 live site, archived pages, and some additional information.
32
33 If you don't want the DBM files to live in /tmp you must make sure the web
34 server can read/write to your chosen location.  It's probably a bad idea
35 to leave it in /tmp. (Again, edit lib/config.php). 
36
37 For example, you create a subdirectory called "pages" in the wiki
38 directory made when you untarred PhpWiki. Move the DBM files there.
39 The files are called: wikipagesdb, wikiarchivedb, wikilinksdb,
40 wikihottopicsdb, and wikihitcountdb. The files should already have proper
41 rights and owners, as they were created by the web server. Otherwise
42 change them accordingly so your web server can read/write the DBM files.
43
44 Then you must ensure that the web server can access the "pages" directory
45 and can create new files in it. These can be achieved e.g. by doing
46
47 bash$ chmod 777 pages
48
49 Note: this is insecure. The proper way is to let the directory be owned
50 by the web servers GUID and give it read and write access. For example,
51 if your web server runs as 'nobody' you would issue these commands
52 (you may need to do this as 'root'):
53
54 bash$ chown nobody:nogroup pages
55 bash$ chmod 755 pages
56
57 This is necessary so that the server can also create/set the lock file
58 (PHP has a built in locking mechanism for DBM file access).
59
60
61 2. ALLOWING EMBEDDED HTML
62
63 PhpWiki ships with this featured disabled by default. According to CERT 
64 (http://www.cert.org/advisories/CA-2000-02.html) malicious users can embed
65 HTML in your pages that allow pure evil to happen. You can uncomment the 
66 "elseif" in lib/transform.php to allow embedded HTML; but you should never
67 do this if your Wiki is publically accessible.
68
69
70 3. ETC
71
72 Installing PHP is beyond the scope of this document :-)
73 You should visit http://www.php.net/ if you don't have PHP.
74 Note that I have the web server configured to allow index.php3
75 as the root document of a directory.
76
77 This web application was written under PHP version 3.0.12. I used
78 a very generic installation, so hopefully you will have no problems.
79 The development platform is a Redhat Linux 4.2 box.
80
81 That should be all. Send patches, bugs etc. to swain@wcsb.org.
82
83 FIN