php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12020 dbm insert and replace functions inserting incorrect values.
Submitted: 2001-07-10 12:25 UTC Modified: 2002-05-25 09:01 UTC
From: taxman10m at mediaone dot net Assigned:
Status: Not a bug Package: DBM/DBA related
PHP Version: 4.0.6 OS: NT 4.0
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: taxman10m at mediaone dot net
New email:
PHP Version: OS:

 

 [2001-07-10 12:25 UTC] taxman10m at mediaone dot net
The dbminsert and dbmreplace functions insert erroneous values into the database.

Here is a short script that should identify the problem:

<?php

$dbm = dbmopen("test.db", "n");

for ($c=0; $c < 100; $c++) {
  dbminsert($dbm, $c, $c);
}

for ($c=0; $c < 100; $c++) {
  echo(dbmfetch($dbm, $c) .  "<br>");
}

dbmclose ($dbm);

?>

This is what I get for the first 11 lines of output:

1
1
1
1
1
1
1
1
1
2
10

The remaining output is correct.

I am using the precompiled win32 binary with iPlanet on NT.

If you could send any replies to this email address as well as the other one listed I would appreciate it:
Patrick.Johnson@usdoj.gov

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-25 09:01 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 01:01:32 2019 UTC