php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19724 Limited data size on read
Submitted: 2002-10-02 15:52 UTC Modified: 2002-12-12 21:16 UTC
From: shoe at expressivetek dot com Assigned: vlad (profile)
Status: Closed Package: dBase related
PHP Version: 4.2.3 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shoe at expressivetek dot com
New email:
PHP Version: OS:

 

 [2002-10-02 15:52 UTC] shoe at expressivetek dot com
When using dbase_get_record or dbase_get_record_with_names to read from a DBF file, it only returns a maximum of 255 fields now. It did not do this in previous versions.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-08 12:28 UTC] vlad@php.net
Actually, it seems to return only up to 254 fields, which is a bug on its own. I believe, there was a limit of 255 fields for dbase4 format. I do not believe this is the case with dbase5. 

This patch broke it: http://cvs.php.net/diff.php/php4/ext/dbase/dbf_head.c?login=2&r1=1.9&r2=1.10&ty=u

The simpliest way to fix that would be just to increase the constant from 254 to 1024. The better way would be figure out what the author of the patch meant by 'padded field headers'.

I'll look into that.


shoe@expressivetek.com, do you use dbase5? or something else?
 [2002-10-27 19:10 UTC] sniper@php.net
Setting to 'Open' to prevent automatic closing due the no-feedback..

Vlad, what is the status on this?


 [2002-12-09 18:28 UTC] vlad@php.net
didn't have time to look at PHP bugs for a while...

The status:
- No soul seems to know what 'padded field headers' 
- The only case when I can imagine it breaking is in dbase5 with [255...1024] fields (shoe@expressivetek.com did not prove or disprove that)
- I do not want to remove that padding algorythm, because obviously it worked for somebody.

The easy solution would be to just bump up the maximum number of fields. Memory consumption is not *that* much larger, it won't break anything, and, since dbase is dead, I am sure no-one will implement a version that has more than 1024 fields :)

I will do that once a check out a fresh tree. I'll close the bug when I do that.
 [2002-12-12 21:16 UTC] vlad@php.net
I just bumped the number of fields to 1024 instead of 254 (which really should've been 255 in the first place). That *should* be the easy fix.

I see some indication (like here: http://www.dts.nl/support/helpdesk/bde/025/B22220007.htm) that dBase5 (at least for Windows) allows for 1024 fields. Finding real specs for dBase turns out to be pretty hard.

If that doesn't fix your problem, tell me what database you are actually using and re-open the bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 00:01:31 2024 UTC