php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77810 DBF type 'I' field support (binary ULONG32)
Submitted: 2019-03-27 16:15 UTC Modified: 2019-03-28 09:50 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: alter at alter dot org dot ua Assigned:
Status: Open Package: dbase (PECL)
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-03-27 16:15 UTC] alter at alter dot org dot ua
Description:
------------
all PHP versions

Some .DBF files from my bank export (Concord) cannot be opened.
Appeared, that these .DBF contain binary numeric field (type 'I'). This type is defined in the following docs:
http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm
http://www.clicketyclick.dk/databases/xbase/format/db2_dbf.html#DBII_DBF_STRUCT 

Proposed patch adds support for type 'I' fields and PHP warning for unknown field types.

patches for older PHP versions are available at http://alter.org.ua/en/soft/other/pecl_dbase/


Patches

dbase3-Itype.7 (last revision 2019-03-27 16:15 UTC by alter at alter dot org dot ua)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-03-28 09:50 UTC] cmb@php.net
Thanks for the report and the patch!  However, the patch won't
apply against TRUNK, since the 'I' case has been removed there[1],
and I don't think it makes sense to keep PHP 5 support of
PECL/dbase alive (at least not regarding additional features).

Anyhow, I still don't have time to maintain PECL/dbase, so a new
maintainer would be welcome[2].  Or, maybe, it would be more
reasonable to use a pure PHP alternative (packagist.org lists
quite a few of those[3]), since I have doubts that the benefits of
a C implementation outweigh its costs, especially when considering
that PECL/dbase is rather incomplete (IIRC, memo field support is
completely broken).

[1] <http://svn.php.net/viewvc/pecl/dbase/trunk/dbase.c?r1=340845&r2=340844&pathrev=340845>
[2] <https://pecl.php.net/account-request.php>
[3] <https://packagist.org/?query=dbase>
 [2019-03-30 09:22 UTC] alter at alter dot org dot ua
'I' type was removed that time because actually it is not same as 'N', and that implementation was really wrong.
I propose correct implementation for PHP 7
Anyway, I would register on pecl.php.net
Thanks for references to pure PHP libs
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC