ID: 41394 Updated by: [EMAIL PROTECTED] Reported By: charley at collins dot ch -Status: Open +Status: Closed Bug Type: dBase related Operating System: Gentoo Linux PHP Version: 5.2.2 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-05-15 08:32:43] charley at collins dot ch Description: ------------ Create a dbase File with Version 5.2.2 will get currupted dbase header. Can not be opened from Excel or Borlands Dbase-Engine Reproduce code: --------------- // database "definition" $def = array( array("date", "D"), array("name", "C", 50), array("age", "N", 3, 0), array("email", "C", 128), array("ismember", "L") ); // creation $db = dbase_create("/tmp/test.dbf", $def); if(!$db) print "<strong>Error!</strong>"; dbase_close($db); Expected result: ---------------- Hexdump of Dbase File with PHP 5.2.1: 00000000 03 6b 05 0f 00 00 00 00 c1 00 bf 00 00 00 00 00 ^^ Day: 15 ^^ Month: 5 ^^ Year from 1900: 107 + 1900 = 2007 ^^ Dbase-Version: 3 = Dbase Level 5 Actual result: -------------- Hexdump of corrupted Dbase File PHP 5.2.2: 00000000 03 6b 05 da 00 00 00 00 c1 00 bf 00 00 00 00 00 ^^ Day: 218 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ^^ Month: 5 ^^ Year from 1900: 107 + 1900 = 2007 ^^ Dbase-Version: 3 = Dbase Level 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41394&edit=1