From: roberto at spadim dot com dot br
Operating system: any
PHP version: 5.2.4RC1
PHP Bug Type: dBase related
Bug description: header wrong for date field
Description:
------------
sometimes i get 520 size of date field, that's wrong since i can open
files on clipper
i changed source to set field length to 8 and precision to 0 when type of
field is 'D' and it's work, please checkit
Reproduce code:
---------------
some dbf files have problem
Expected result:
----------------
header information of date always be 8 length
Actual result:
--------------
520 length in some cases
check what i do: dbf_head.c
line ~160
switch (dbf->db_type) {
case 'N':
case 'F':
dbf->db_flen = dbfield.dbf_flen[0];
dbf->db_fdc = dbfield.dbf_flen[1];
break;
=> case 'D':
=> dbf->db_flen = 8;
=> break;
default:
dbf->db_flen = get_short(dbfield.dbf_flen);
break;
}
--
Edit bug report at http://bugs.php.net/?id=42261&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42261&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42261&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42261&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42261&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42261&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42261&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42261&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42261&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42261&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42261&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42261&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42261&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42261&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42261&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42261&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42261&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42261&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42261&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42261&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42261&r=mysqlcfg