From:             cory dot nemelka at nemelkaitgroup dot com
Operating system: RHEL 3.0
PHP version:      5.1.6
PHP Bug Type:     dBase related
Bug description:  dbase_open no longer functions

Description:
------------
Since upgrading from PHP v5.0 to PHP v5.1, the dbase_open function no
longer works.  The problem appears to be a byte-ordering problem in the
"file-type" byte of the header (offset 0).

The problem is illustrated below.  This file opens properly under PHP v5.0
but returns an "unable to get header" under v5.1.

Reproduce code:
---------------
# od -tx1 mattndea.dbf | head
0000000 30 06 0a 04 eb ac 03 00 08 03 33 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00
0000040 4d 45 4d 42 45 52 5f 49 44 00 00 43 01 00 00 00
0000060 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000100 44 41 54 45 00 00 00 00 00 00 00 44 0d 00 00 00
0000120 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000140 54 49 4d 45 00 00 00 00 00 00 00 43 15 00 00 00
0000160 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000200 4c 4f 43 41 54 49 4f 4e 00 00 00 43 1c 00 00 00
0000220 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# od -tx2 mattndea.dbf | head
0000000 0630 040a aceb 0003 0308 0033 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0300 0000
0000040 454d 424d 5245 495f 0044 4300 0001 0000
0000060 000c 0000 0000 0000 0000 0000 0000 0000
0000100 4144 4554 0000 0000 0000 4400 000d 0000
0000120 0008 0000 0000 0000 0000 0000 0000 0000
0000140 4954 454d 0000 0000 0000 4300 0015 0000
0000160 0007 0000 0000 0000 0000 0000 0000 0000
0000200 4f4c 4143 4954 4e4f 0000 4300 001c 0000
0000220 0004 0000 0000 0000 0000 0000 0000 0000



-- 
Edit bug report at http://bugs.php.net/?id=39170&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39170&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39170&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39170&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39170&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39170&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39170&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39170&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39170&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39170&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39170&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39170&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39170&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39170&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39170&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39170&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39170&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39170&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39170&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39170&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39170&r=mysqlcfg

Reply via email to