|
From: <var...@us...> - 2021-09-17 11:14:08
|
Revision: 10563
http://sourceforge.net/p/phpwiki/code/10563
Author: vargenau
Date: 2021-09-17 11:14:06 +0000 (Fri, 17 Sep 2021)
Log Message:
-----------
db4 is the default DBA handler
Modified Paths:
--------------
trunk/INSTALL
trunk/config/config-default.ini
trunk/config/config-dist.ini
trunk/configurator.php
trunk/lib/DbSession/dba.php
trunk/lib/DbaDatabase.php
trunk/lib/WikiDB/backend/dba.php
trunk/lib/WikiDB/backend/dbaBase.php
trunk/lib/WikiDB.php
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/INSTALL 2021-09-17 11:14:06 UTC (rev 10563)
@@ -91,10 +91,10 @@
"Fatal error: Call to undefined function: dba_open() in
phpwiki/lib/DbaDatabase.php on line 32"
-To correct this you will have to check the available dba handlers
-(default: db3 for Windows, otherwise gdbm), install the dba extension
-or preferably an sql-compatible database such as MySQL or PostgreSQL
-and make the necessary configuration changes to 'lib/config/config.ini'.
+To correct this you will have to check the available dba handlers,
+install the dba extension or preferably an sql-compatible database
+such as MySQL or PostgreSQL and make the necessary configuration
+changes to 'lib/config/config.ini'.
INSTRUCTIONS
Modified: trunk/config/config-default.ini
===================================================================
--- trunk/config/config-default.ini 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/config/config-default.ini 2021-09-17 11:14:06 UTC (rev 10563)
@@ -60,7 +60,7 @@
DATABASE_PREFIX = ""
DATABASE_SESSION_TABLE = session
DATABASE_DIRECTORY = /tmp
-DATABASE_DBA_HANDLER = gdbm
+DATABASE_DBA_HANDLER = db4
DATABASE_TIMEOUT = 20
DATABASE_OPTIMISE_FREQUENCY = 50
DATABASE_PERSISTENT = false
Modified: trunk/config/config-dist.ini
===================================================================
--- trunk/config/config-dist.ini 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/config/config-dist.ini 2021-09-17 11:14:06 UTC (rev 10563)
@@ -447,13 +447,11 @@
DATABASE_DIRECTORY = /tmp
; For the dba backend, this defines which DBA variant you wish to use.
-; gdbm - commonly available, Fedora not. Not recommended anymore.
-; db2 - Berkeley DB v2; not supported by modern versions of PHP.
-; db3 - Berkeley DB v3; as per db2. The best on Windows.
-; db4 - Berkeley DB v4; current version, however PHP has some issues
-; with its db4 support.
-; dbm - Older dba handler; suffers from limits on the size of data
-; items.
+; gdbm - commonly available, Fedora not. Not recommended anymore.
+; db2 - Berkeley DB v2; not supported by modern versions of PHP.
+; db3 - Berkeley DB v3; as per db2. The best on Windows.
+; db4 - Berkeley DB v4; current version. Default.
+; dbm - Older dba handler; suffers from limits on the size of data items.
; Better not use other hacks such as inifile, flatfile or cdb.
DATABASE_DBA_HANDLER = db4
Modified: trunk/configurator.php
===================================================================
--- trunk/configurator.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/configurator.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -793,10 +793,10 @@
$properties["dba handler"] =
new _define_selection('DATABASE_DBA_HANDLER',
array('gdbm' => "gdbm - GNU database manager (not recommended anymore)",
- 'dbm' => "DBM - Redhat default. On sf.net there's dbm and not gdbm anymore",
+ 'dbm' => "DBM - Redhat default.",
'db2' => "DB2 - BerkeleyDB (Sleepycat) DB2",
'db3' => "DB3 - BerkeleyDB (Sleepycat) DB3. Default on Windows but not on every Linux",
- 'db4' => "DB4 - BerkeleyDB (Sleepycat) DB4."), "
+ 'db4' => "DB4 - BerkeleyDB (Sleepycat) DB4. Default."), "
Use 'gdbm', 'dbm', 'db2', 'db3' or 'db4' depending on your DBA handler methods supported: <br /> "
. join(", ", dba_handlers())
. "\n\nBetter not use other hacks such as inifile, flatfile or cdb");
Modified: trunk/lib/DbSession/dba.php
===================================================================
--- trunk/lib/DbSession/dba.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/lib/DbSession/dba.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -66,7 +66,7 @@
if (!$dbh) {
$directory = '/tmp';
$prefix = 'wiki_';
- $dba_handler = 'gdbm';
+ $dba_handler = 'db4';
$timeout = 12;
extract($DBParams); // overwrite the defaults
$dbfile = "$directory/$prefix" . 'session' . '.' . $dba_handler;
Modified: trunk/lib/DbaDatabase.php
===================================================================
--- trunk/lib/DbaDatabase.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/lib/DbaDatabase.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -48,7 +48,7 @@
* @param bool $mode
* @param string $handler
*/
- function __construct($filename, $mode = false, $handler = 'gdbm')
+ function __construct($filename, $mode = false, $handler = 'db4')
{
$this->_file = $filename;
$this->_handler = $handler;
@@ -96,10 +96,7 @@
}
if ((strlen($mode) == 1)) {
- // PHP 4.3.x Windows lock bug workaround: http://bugs.php.net/bug.php?id=23975
- if (isWindows()) {
- $mode .= "-"; // suppress locking, or
- } elseif ($this->_handler != 'gdbm') { // gdbm does it internally
+ if ($this->_handler != 'gdbm') { // gdbm does it internally
$mode .= "d"; // else use internal locking
}
}
Modified: trunk/lib/WikiDB/backend/dba.php
===================================================================
--- trunk/lib/WikiDB/backend/dba.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/lib/WikiDB/backend/dba.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -34,7 +34,7 @@
{
$directory = '/tmp';
$prefix = 'wiki_';
- $dba_handler = 'gdbm';
+ $dba_handler = 'db4';
$timeout = 20;
extract($dbparams);
if ($directory) $directory .= "/";
Modified: trunk/lib/WikiDB/backend/dbaBase.php
===================================================================
--- trunk/lib/WikiDB/backend/dbaBase.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/lib/WikiDB/backend/dbaBase.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -26,9 +26,6 @@
require_once 'lib/WikiDB/backend.php';
-// FIXME:padding of data? Is it needed? dba_optimize() seems to do a good
-// job at packing 'gdbm' (and 'db2') databases.
-
/*
* Tables:
*
Modified: trunk/lib/WikiDB.php
===================================================================
--- trunk/lib/WikiDB.php 2021-09-17 11:09:28 UTC (rev 10562)
+++ trunk/lib/WikiDB.php 2021-09-17 11:14:06 UTC (rev 10563)
@@ -143,8 +143,7 @@
* <dt> dba_handler
* <dd> (Used by the dba backend.)
*
- * Which dba handler to use. Good choices are probably either
- * 'gdbm' or 'db2'.
+ * Which dba handler to use.
*
* <dt> readonly
* <dd> Either set by config.ini: READONLY = true or detected automatically
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|