|  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
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:
Solve the problem:
44 + 39 = ?
Subscribe to this entry?

 [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-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 18 19:05:43 2022 UTC