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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nemeth_zoltan at ba dot novitech dot sk
New email:
PHP Version: OS:

 

 [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-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 09 01:03:34 2021 UTC