php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #851 corrupting of dBase structure of file
Submitted: 1998-10-16 03:57 UTC Modified: 1998-11-23 01:19 UTC
From: nemeth_zoltan at ba dot novitech dot sk Assigned:
Status: Closed Package: dBase related
PHP Version: 3.0.5 OS: WinNT 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 9 = ?
Subscribe to this entry?

 
 [1998-10-16 03:57 UTC] nemeth_zoltan at ba dot novitech dot sk
the problem reason: the dBase file os opened for writing in text mode, not binary mode,
and causes following:

1. if I modify database on 10-th of month or in October, the database is corrupted!
2. if I modify database on 26-th of month, the database is corrupted too...
3. if I create field with width 10, the database is corrupted too...
4. if I create field with width 26, the database is not corrupted, but...
5. if I write 10-th record, the database is corrupted too...
6. if I write 26-th record, the database is corrupted too...

why?
  1. if dbase.dll wites 0xa, it is traslated to 0x0d 0x0a (text mode)
  2. if dbase.dll wites 26. record or field with width 26, after reading the php.exe hangs because in text mode
      is 26 Ctrl-Z - End of File marker.....

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-23 01:19 UTC] jim
Fixed in latest CVS by opening databases in binary mode.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 09:03:33 2022 UTC