php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #648 Corrupts dbase files
Submitted: 1998-08-12 17:18 UTC Modified: 1998-11-23 01:23 UTC
From: carlos_sousa at altavista dot net Assigned:
Status: Closed Package: dBase related
PHP Version: 3.0.2a OS: Windows 98
Private report: No CVE-ID: None
 [1998-08-12 17:18 UTC] carlos_sousa at altavista dot net
  After adding a few Kb of records dbase files get corrupted. Here is the script I used to detect the bug:

<?php
echo "teste";
//dl("dbase.dll");
if(!file_exists("teste.dbf"))
{
    $estrutura2=array(array("NUMERO","c",10,0),array("NUMERO2","N",10,0),array("NUMERO3","N",10,0),
                      array("NUMERO4","c",10,0),array("NUMERO5","N",10,0),array("NUMERO6","N",10,0));
    dbase_create("teste.dbf",$estrutura2);
}
 
 $cli_id=dbase_open("teste.dbf",2);
 for($x=0;$x<1000;$x++)
 {
     $linha=array($x,$x+1,$x,$x,$x,$x);
     dbase_add_record($cli_id,$linha);
  }
  dbase_close($cli_id);
  
?>
      Hope I hear from you soon (excuse my losy english..)

                                      Thanks,

                                 Carlos Sousa From Portugal

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-23 01:23 UTC] jim
Should be fixed in latest CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC