]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Removed the notice that PhpWiki did not work with 4.0.4 out of the
[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.
8
9 bash$ gzip -d phpwiki-X.XX.tar.gz
10 bash$ tar -xvf phpwiki-X.XX.tar
11
12 To improve efficiency, edit lib/config.php and set the $ServerAddress
13 by hand; this will save a regexp call on every invocation.
14
15 Example:
16 Let's say you own the web server http://www.foo.com/. You untar in the
17 server's root directory; then you should be able to just go to your new
18 Wiki:
19
20 http://www.foo.com/phpwiki/index.php
21
22 If you configure your server to recognize index.php as the index of a
23 directory, you can just do:
24
25 http://www.foo.com/phpwiki/
26
27
28 1. CONFIGURATION
29
30 The first time you run this Wiki it will load a set of basic pages from
31 the pgsrc/ directory. These should be enough to get your Wiki started.
32
33 PhpWiki will create some DBM files in /tmp. They contain the pages of the
34 live site, archived pages, and some additional information.
35
36 If you don't want the DBM files to live in /tmp you must make sure the web
37 server can read/write to your chosen location.  It's probably a bad idea
38 to leave it in /tmp. (Again, edit lib/config.php). 
39
40 For example, you create a subdirectory called "pages" in the wiki
41 directory made when you untarred PhpWiki. Move the DBM files there.
42 The files are called: wikipagesdb, wikiarchivedb, wikilinksdb,
43 wikihottopicsdb, and wikihitcountdb. The files should already have proper
44 rights and owners, as they were created by the web server. Otherwise
45 change them accordingly so your web server can read/write the DBM
46 files. (Note you must be root to move files created by the web server).
47
48 Then you must ensure that the web server can access the "pages" directory
49 and can create new files in it. These can be achieved e.g. by doing
50
51 bash$ chown nobody:youraccount pages
52 bash$ chmod 755 pages
53
54 if your web server runs as user 'nobody'. This is necessary so that
55 the server can also create/set the lock file (PHP has a built in
56 locking mechanism for DBM file access).  Or if you're really lazy and
57 don't worry much about security:
58
59 bash$ chmod 777 pages
60
61 Note: this is insecure. The proper way is to let the directory be owned
62 by the web servers GUID and give it read and write access.
63
64
65
66 2. ALLOWING EMBEDDED HTML
67
68 PhpWiki ships with this featured disabled by default. According to CERT 
69 (http://www.cert.org/advisories/CA-2000-02.html) malicious users can embed
70 HTML in your pages that allow pure evil to happen. You can uncomment the 
71 "elseif" in lib/transform.php to allow embedded HTML; but you should NEVER
72 do this if your Wiki is publically accessible.
73
74
75 3. ETC
76
77 Installing PHP is beyond the scope of this document :-)
78 You should visit http://www.php.net/ if you don't have PHP.
79 Note that you should have the web server configured to allow index.php
80 as the root document of a directory.
81
82 This web application was written under PHP version 3.0.12 and 
83 the latest build of PHP4. It's tested under the following systems:
84
85 MySQL + Debian
86 mSQL + Red Hat 4.1
87 DBM or Postgresql on Red Hat 6.2
88
89 It reportedly works on Windows with Apache+PHP, which amazes me. 
90
91 That should be all. Send patches, bugs etc. to:
92
93 phpwiki-talk@lists.sourceforge.net
94
95 FIN