<< Back Home UK uk   Donate Donate

PECL DBASE type 'I' filed support

by Alter ( (remove X))

I was using dbase module v5.1.0 (pecl_dbase) for PHP. I met the following problem with some .DBF files from my bank export (Concord):

PHP Warning:  dbase_open(): unable to open database xxx.dbf in /var/tmp

Google gives a lot of reports like "really, doesn't work sometimes" but without definite solution or explanation. Appeared, my .DBF contained binary numeric field (type 'I'). Usually, type 'N' with plain-text number represenation is used. The patch proposed adds support for type 'I' fields and PHP warning for unknown field types. When upgrading system appeared that new pecl_dbase v5.1.0 have the same problem, but patch is a bit different.

All patches are sent to development team dbase-pecl-php7 issues 5

pecl_dbase 7

pecl_dbase 5.1.1

pecl_dbase 5.1.0

Linux (gentoo)

# ebuild /usr/portage/dev-php/pecl-dbase/pecl-dbase-5.1.1.ebuild unpack
# cd /var/tmp/portage/dev-php/pecl-dbase-5.1.1/work/php-5.6
# patch < ~/dbase3-Itype.5.1.patch
# cd /var/tmp/portage/dev-php/pecl-dbase-5.1.1/work/dbase-5.1.1
# patch < ~/dbase3-Itype.5.1.patch
# ebuild /usr/portage/dev-php/pecl-dbase/pecl-dbase-5.1.1.ebuild compile
# ebuild /usr/portage/dev-php/pecl-dbase/pecl-dbase-5.1.1.ebuild install

Paths and versions may be different. After successfull build make sure that


is fresh and is copied to proper location under


See also:

FB or mail (remove X)   Share
designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2024