php.net |  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
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: 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.
  
regards,
-rp

Patches

Pull Requests

History

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: Mon Oct 14 08:01:27 2024 UTC