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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 09:03:33 2022 UTC