]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Reread and updated.
[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/phpwiki/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/phpwiki/
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
43 files. (Note you must be root to move files created by the web server).
44
45 Then you must ensure that the web server can access the "pages" directory
46 and can create new files in it. These can be achieved e.g. by doing
47
48 bash$ chown nobody:youraccount pages
49 bash$ chmod 755 pages
50
51 if your web server runs as user 'nobody'. This is necessary so that
52 the server can also create/set the lock file (PHP has a built in
53 locking mechanism for DBM file access).  Or if you're really lazy and
54 don't worry much about security:
55
56 bash$ chmod 777 pages
57
58 Note: this is insecure. The proper way is to let the directory be owned
59 by the web servers GUID and give it read and write access.
60
61
62
63 2. ALLOWING EMBEDDED HTML
64
65 PhpWiki ships with this featured disabled by default. According to CERT 
66 (http://www.cert.org/advisories/CA-2000-02.html) malicious users can embed
67 HTML in your pages that allow pure evil to happen. You can uncomment the 
68 "elseif" in lib/transform.php to allow embedded HTML; but you should NEVER
69 do this if your Wiki is publically accessible.
70
71
72 3. ETC
73
74 Installing PHP is beyond the scope of this document :-)
75 You should visit http://www.php.net/ if you don't have PHP.
76 Note that you should have the web server configured to allow index.php
77 as the root document of a directory.
78
79 This web application was written under PHP version 3.0.12 and 
80 the latest build of PHP4. It's tested under the following systems:
81
82 MySQL + Debian
83 mSQL + Red Hat 4.1
84 DBM or Postgresql on Red Hat 6.2
85
86 It reportedly works on Windows with Apache+PHP, which amazes me. 
87
88 That should be all. Send patches, bugs etc. to:
89
90 phpwiki-talk@lists.sourceforge.net
91
92 FIN