|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #262 dbminsert() failure / db.c flaws
Submitted: 1998-04-10 19:39 UTC Modified: 1998-04-28 22:15 UTC
From: pradella at cryogen dot com Assigned: jim (profile)
Status: Closed Package: DBM/DBA related
PHP Version: 3.0b6 OS: FBSD 2.2.5
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.
Block user comment
Status: Assign to:
Bug Type:
From: pradella at cryogen dot com
New email:
PHP Version: OS:


 [1998-04-10 19:39 UTC] pradella at cryogen dot com
Dbm support is broken:

1. Bug: flat file dbminsert() always returns 0 regardless of key existance.
From looking at the flatfile_store() src this is a clear bug.
Also, entries are just [re-]appended here, which may give key repetitions.

2. Bug/Cosmetics: Quite some functions in db.c still seem to pass 0 for successful
returns, contradicting the doc. The comment at php3_insert() should be changed.

3. Bug (diffuse): Again with flat file dbm, I observed diffuse overwrites
which looked as if dbmopen(...,"w") sometimes behaved like "n".
I could not look into this at reasonable depth yet but this is a
PHP problem for sure. I'd suspect the unportable use of #defined char
arrays in db.c here but I may well be wrong with this point.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-28 22:15 UTC] jim
1. Fixed in the latest CVS.
2. This was a bug in the docs (for dbminsert(), at least).
3. We will need more information to reproduce this. I'm not sure
   what it is you're saying is unportable. Open another bug
   with more info if this is still a problem.

Thanks for the report!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 11:01:27 2024 UTC