|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45266 DB_INIT_LOCK not a valid option
Submitted: 2008-06-14 00:46 UTC Modified: 2008-06-19 22:42 UTC
From: Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 5.3CVS-2008-06-14 (CVS) OS: Linux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2008-06-14 00:46 UTC]
In ext/dba/dba_db4.c, the DB_INIT_LOCK bit is set in the gmode flag
passed into dbp->open().  This is not a valid option for opening a
BDB4 DB.  The DBA code may have accidently worked against earlier
versions of BDB because the integer value of the option previously
matched a valid value.

Tested with BDB 4.7.25

For debugging, note in BDB's db-4.7.25/db/db_iface.c the OKFLAGS macro
doesn't include DB_INIT_LOCK.

Reproduce code:
$filename = "/tmp/dba1.db";
$d = dba_open($filename, "c", "db4");

Expected result:
No error

Actual result:
Warning: dba_open(/tmp/dba1.db,c): Driver initialization failed for handler: db4: Invalid argument in dba1.php on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-19 22:42 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 02:01:29 2024 UTC