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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 04:01:29 2025 UTC