dbase

dBase database file access functions


These functions allow you to access records stored
in dBase-format (dbf) databases.

There is no support for indexes or memo fields.
The databases are automatically locked with blocking flock()s.

dBase files are simple sequential files of fixed length records.
Records are appended to the end of the file and deleted records
are kept until you call dbase_pack().

License: PHP

Latest releases

Version Release Download
7.1.0 2021-06-13 dbase-7.1.0.tgz
7.1.0RC2 2020-10-04 dbase-7.1.0RC2.tgz
7.1.0RC1 2020-10-04 dbase-7.1.0RC1.tgz
7.0.1 2019-10-20 dbase-7.0.1.tgz
7.0.0 2019-04-17 dbase-7.0.0.tgz
Show all releases

Changelog

Version Message
7.1.0 New features

- Full fledged arginfo is available under PHP 8 (Remi Collet)
- Calling dbase functions with wrong parameter types/values throws TypeExceptions and
ValueExceptions, respectively, instead of raising warnings under PHP 8 (Remi Collet)

Bug Fixes

- Fixed #80156 (Incomplete records may be written)
- Fixed #80488 (ReflectionParameter->getDefaultValue() throws for dbase_create())
7.1.0RC2 New features

- Full fledged arginfo is available under PHP 8 (Remi Collet)
- Calling dbase functions with wrong parameter types/values throws TypeExceptions and
ValueExceptions, respectively, instead of raising warnings under PHP 8 (Remi Collet)

Bug Fixes

- Fixed #80156 (Incomplete records may be written)
7.1.0RC1 New features

- Full fledged arginfo is available under PHP 8 (Remi Collet)
- Calling dbase functions with wrong parameter types/values throws TypeExceptions and
ValueExceptions, respectively, instead of raising warnings under PHP 8 (Remi Collet)

Bug Fixes

- Fixed #80156 (Incomplete records may be written)
7.0.1 Security Fixes

- Fixed #78668 (Out-of-bounds Read in dbase.c)

Bug Fixes

- Fixed #78070 (dbase functions may modify passed array)
- Fixed #78594 (compile error: 'LOCK_EX' undeclared)
7.0.0 Backward Incompatible Changes

- database link identifiers are now proper resources instead of integers
- logical values are now retrieved as booleans instead of integers

New Features

- FoxPro datetime fields ('T') are now supported as "YYYYMMDDhhmmss.uuu"
- Uninitialized logical fields are now supported as NULL
- base_create() now supports an optional $type parameter (either DBASE_TYPE_DBASE
or DBASE_TYPE_FOXPRO) to define the type of database to be created
- FoxPro nullable fields are now transparently supported
- The $mode of dbase_open() can now be specified as DBASE_RDONLY or DBASE_RDWR
- The version of the dbase extension is now available as DBASE_VERSION
- Basic database locking has been implemented
- Internally the Zend memory manager is now used
- Error reporting has been improved; e.g. unsupported field type now raise a
warning

Bug Fixes

- Fixed #39305 (Use of decimal point in different countries)
- Fixed #52112 (dbase_get_record() returns integer instead of decimal values)
- Fixed #68289 (wrong strlcpy call)
- Fixed #72812 (dbase_create does not close the FD on failure)
- Fixed #72815 (zend_get_parameters_ex() is deprecated)
- Fixed #73391 (Writing of floats can cause OOB reads)
- Fixed #73395 (failing dbase_create() may leak memory)
- Fixed #73411 (dbase_pack() returns TRUE on failure)
- Fixed #73414 (Unsupported field types may cause dbase_open() to leak memory)
- Fixed #73442 (Float fields always have precision 0)
- Fixed #73447 (Floats written to character fields are truncated to integer)
- Fixed #74983 (SIGABRT when function put_dbf_field is called)
Show complete changelog