xref: /PHP-7.2/ext/dba/README (revision 60a69dae)
1These functions build the foundation for accessing Berkeley DB style
2databases.
3
4This is a general abstraction layer for several file-based databases. As
5such, functionality is limited to a common subset of features supported
6by modern databases such as Sleepycat Software's DB2. (This is not to be
7confused with IBM's DB2 software, which is supported through the ODBC
8functions.)
9
10This extensions allows to work with the following databases:
11dbm      DBM is the oldest (original) type of Berkeley DB style databases.
12         You should avoid it, if possible. We do not support the
13         compatibility functions built into DB2 and gdbm, because they are
14         only compatible on the source code level, but cannot handle the
15         original dbm format.
16ndbm     NDBM is a newer type and more flexible than dbm. It still has
17         most of the arbitrary limits of dbm (therefore it is deprecated).
18gdbm     GDBM is the GNU database manager.
19db2      DB2 is Sleepycat Software's DB2. It's described as "a programmatic
20         toolkit that provides high-performance built-in database support
21         for both standalone and client/server applications.
22db3      DB3 is Sleepycat Software's DB3.
23db4      DB4 is Sleepycat Software's DB4. This is available since PHP 5.0.
24cdb      CDB is "a fast, reliable, lightweight package for creating and
25         reading constant databases." It is from the author of qmail and
26         can be found at http://cr.yp.to/cdb.html. Since it is constant,
27         we support only reading operations. And since PHP 4.3.0 we support
28         writing (not updating) through the internal cdb library.
29cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files
30         when the bundled cdb library is used.
31flatfile This is available since PHP 4.3.0 for compatibility with the
32         deprecated dbm extension only and should be avoided. However you
33         may use this where files were created in this format. That happens
34         when configure could not find any external library.
35inifile  This is available since PHP 4.3.3 to be able to modify php.ini
36         files from within PHP scripts. When working with ini files you
37         can pass arrays of the form array(0=>group,1=>value_name) or
38         strings of the form "[group]value_name" where group is optional.
39         As the functions dba_firstkey() and dba_nextkey() return string
40         representations of the key there is a new function dba_key_split()
41         available since PHP 5 which allows to convert the string keys into
42         array keys without losing FALSE.
43qdbm     This is available since PHP 5.0.0. The qdbm library can be loaded
44         from http://qdbm.sourceforge.net.
45
46
47After configuring and compiling PHP you must execute the following test
48from commandline:
49  php run-tests.php ext/dba.
50This shows whether your combination of handlers works. Most problematic
51are dbm and ndbm which conflict with many installations. The reason for
52this is that on several systems these libraries are part of more than one
53other library. The configuration test only prevents you from configuring
54malfaunctioning single handlers but not combinations.
55