php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32056 different handles are ignored for DBM databases
Submitted: 2005-02-21 18:48 UTC Modified: 2005-02-21 19:28 UTC
From: dbai at lantanet dot cz Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: * OS: *
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: dbai at lantanet dot cz
New email:
PHP Version: OS:

 

 [2005-02-21 18:48 UTC] dbai at lantanet dot cz
Description:
------------
Functions dba_firstkey/nextkey ignore specified db handle and use last opened DBM database.

Reproduce code:
---------------
#!/usr/local/bin/php
<?
$db_one = dba_open("datadb_one","r","dbm");
$db_two = dba_open("datadb_two","r","dbm");      
 
if ($key = dba_firstkey($db_one) {
  do { 
    echo("$key\n");
  } while ($key = dba_nextkey($db_one));
}  
?> 


Expected result:
----------------
Keys from datadb_one

Actual result:
--------------
Keys from datadb_two (from last opened database).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-21 19:28 UTC] helly@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

that's a known limitation
as said in the documentation avoid handler 'dbm'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 14:01:33 2024 UTC