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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 + 32 = ?
Subscribe to this entry?

 
 [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: Mon Jun 03 18:01:32 2024 UTC