php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7620 dbase_get_record_with_names crashes php
Submitted: 2000-11-03 08:46 UTC Modified: 2001-10-09 04:42 UTC
From: swift at mindless dot com Assigned:
Status: Closed Package: dBase related
PHP Version: 4.0.3pl1 OS: Win98Me
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: swift at mindless dot com
New email:
PHP Version: OS:

 

 [2000-11-03 08:46 UTC] swift at mindless dot com
Hi!

When I use dbase_get_record_with_names instead of dbase_get_record on one of my database to import, php crashes!

If you need it, I could send you the dbase-database that caused the problem - please mail me if I should do so.

... tobias wiersch from germany

PS: I used the following code (example):

<?php

  include('head.php'); include('body.php');
  include('maincfg.php');

  $dbf = dbase_open('d:/3dx/php/product.dbf', 0)
    or die('there is no product.dbf!');

  $RecNum = dbase_numrecords($dbf);

  for($i=1; $i <= $RecNum; $i++)
  {
    $row = dbase_get_record_with_names($dbf, $i);
    echo $row["prod_no"] . "<br>";
  }

  dbase_close($dbf);

?>

---------------- but this is working:

<?php

  include('head.php'); include('body.php');
  include('maincfg.php');

  $dbf = dbase_open('d:/3dx/php/product.dbf', 0)
    or die('there is no product.dbf!');

  $RecNum = dbase_numrecords($dbf);

  for($i=1; $i <= $RecNum; $i++)
  {
    $row = dbase_get_record($dbf, $i);
    echo $row[0] . "<br>";
  }

  dbase_close($dbf);

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-09 04:42 UTC] sniper@php.net
Please try the latest CVS snapshot from 
http://snaps.php.net/ as this should now be fixed.

--Jani
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC