1 If you cannot run PhpWiki on top of a relational database like
2 MySQL or Postgresql, and your system does not support DBM files
3 or (worse) has a broken implementation like NDBM on Solaris, then
4 a flat file Wiki might work for you.
6 Installation is similar to using a DBM file for storing the pages.
7 You should read the main INSTALL file before this one (it's not long
8 and complicated so go ahead and we'll wait for you right here).
10 First, edit lib/config.php and set the database to "file":
12 $WhichDatabase = 'file'; // use one of "dbm", "mysql", "pgsql", "msql",
16 Now, the key thing is you need a directory that the web server can
17 read and write to. This is where it will store current and archived
20 If you have root access the next section applies to you. If you don't
21 have root access, skip down to the section "I DON'T HAVE ROOT ACCESS"
22 to see what options you have.
24 Choose where you want to have the pages stored; on my system I put
25 them in a directory under the PhpWiki root directory. That is, I
26 installed my PhpWiki in /home/swain/public_html/flatfiletest/phpwiki.
27 I created a directory called "pages" like this:
29 [root@localhost phpwiki]# mkdir pages
31 This creates a new directory:
33 [swain@localhost phpwiki]$ ls -l
35 -rw-r--r-- 1 swain swain 1776 Dec 22 16:10 CREDITS
36 -rw-r--r-- 1 swain swain 6323 Dec 12 16:53 DBLIB.txt
37 -rw-r--r-- 1 swain swain 10373 Nov 5 22:19 HISTORY
38 -rw-r--r-- 1 swain swain 3241 Oct 8 15:08 INSTALL
39 -rw-r--r-- 1 swain swain 1241 Oct 8 14:12 INSTALL.mSQL
40 -rw-r--r-- 1 swain swain 1584 Oct 8 14:12 INSTALL.mysql
41 -rw-r--r-- 1 swain swain 2001 Oct 8 15:19 INSTALL.pgsql
42 -rw-r--r-- 1 swain swain 18106 Jun 2 2000 LICENSE
43 -rw-r--r-- 1 swain swain 2873 Dec 12 16:24 README
44 drwxrwxr-x 2 swain swain 1024 Jan 1 18:46 admin
45 -rw-r--r-- 1 swain swain 2366 Nov 13 05:59 admin.php
46 drwxrwxr-x 2 swain swain 1024 Jan 1 18:46 images
47 -rw-r--r-- 1 swain swain 1305 Nov 8 10:34 index.php
48 drwxrwxr-x 2 swain swain 1024 Jan 3 22:44 lib
49 drwxrwxr-x 6 swain swain 1024 Jan 1 18:46 locale
50 drwxrwxr-x 4 swain swain 1024 Jan 1 18:50 pages
51 drwxrwxr-x 2 swain swain 1024 Jan 1 18:46 pgsrc
52 drwxrwxr-x 2 swain swain 1024 Jan 1 18:46 schemas
53 drwxrwxr-x 2 swain swain 1024 Jan 1 18:46 templates
55 Next, I'm going to change the owner of the directory. Your web server
56 probably runs as user "nobody," so I log in as root and run the chown
59 [swain@localhost phpwiki]$ su
61 [root@localhost phpwiki]# chown nobody:nobody pages
63 Now the directory is read/writable by "nobody" and should work
64 fine. If your web server runs as a different user substitute the
68 I DON'T HAVE ROOT ACCESS...
70 If you do not have root access to your machine you are in a tougher
71 situation. What you can do is give the directory read/write permission
72 to anybody, but for security reasons this is a bad idea.
74 The second thing you can do is have your systems administrator install
75 PhpWiki for you, or at least follow the steps above to create a
76 directory owned by the web server.
78 Another solution is to let the web server create the directory for
79 you. The drawback to this approach is that you won't be able to edit
80 the files or copy them from the command line, but most people can live
81 with this limitation. This will require you to TEMPORARILY make the
82 phpwiki/ directory world writable:
88 and create a PHP file like this:
93 <title>Make a directory</title>
99 I created this to set up server-writable files
100 for the Wiki. You shouldn't have world writable files.
103 $int = mkdir("pages", 0775);
104 if ($int) { echo "mkdir returned $int (success)\n"; }
109 Put the file in the phpwiki/ directory and call it through a web
110 browser. This should create a directory owned by the web server in the
114 Now you need to restore the permissions of the phpwiki directory
120 If you have problems after all of this, try contacting the
121 phpwiki-talk list at phpwiki-talk@lists.sourceforge.net.
126 $Id: INSTALL.flatfile,v 1.1 2001-01-06 19:30:31 wainstead Exp $