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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 10:01:28 2024 UTC