From c591219f06406c348020fab2213479bf6ddb0212 Mon Sep 17 00:00:00 2001 From: wainstead Date: Wed, 7 Nov 2001 03:23:24 +0000 Subject: [PATCH] Added a new constant, DBM_FILE_TYPE, defaulting to 'gdbm'. It's defined in config.php and used in dbalib.php. INSTALL now notes the setting of this constant, and how a blank page can occur the first time the user tries to view PhpWiki. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/branches/release-1_2-branch@604 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- INSTALL | 3 +++ lib/config.php | 9 ++++++++- lib/dbalib.php | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index c3e9606ec..3e3a9fc76 100644 --- a/INSTALL +++ b/INSTALL @@ -24,6 +24,9 @@ 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 diff --git a/lib/config.php b/lib/config.php index 56bbce01e..cef3ead89 100644 --- a/lib/config.php +++ b/lib/config.php @@ -10,7 +10,7 @@ if (!function_exists('rcs_id')) { function rcs_id($id) { echo "\n"; }; } - rcs_id('$Id: config.php,v 1.24.2.3 2001-11-02 05:11:16 wainstead Exp $'); + rcs_id('$Id: config.php,v 1.24.2.4 2001-11-07 03:23:20 wainstead Exp $'); // end essential internal stuff @@ -57,6 +57,13 @@ $WikiDB['wikilinks'] = "$DBMdir/wikilinksdb"; $WikiDB['hottopics'] = "$DBMdir/wikihottopicsdb"; $WikiDB['hitcount'] = "$DBMdir/wikihitcountdb"; + + // this is the type of DBM file on your system. For most Linuxen + // 'gdbm' is fine; 'db2' is another common type. 'ndbm' appears + // on Solaris but won't work because it won't store pages larger + // than 1000 bytes. + define("DBM_FILE_TYPE", 'gdbm'); + // try this many times if the dbm is unavailable define("MAX_DBM_ATTEMPTS", 20); diff --git a/lib/dbalib.php b/lib/dbalib.php index 5106c04d8..833398d8f 100644 --- a/lib/dbalib.php +++ b/lib/dbalib.php @@ -1,6 +1,6 @@ MAX_DBM_ATTEMPTS) { ExitWiki("Cannot open database '$key' : '$file', giving up."); -- 2.45.0