php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37173 dba_open gives an error about uncompatible modifiers when they aren't.
Submitted: 2006-04-23 15:21 UTC Modified: 2006-04-24 15:07 UTC
From: myckel at sdf dot lonestar dot org Assigned: helly (profile)
Status: Not a bug Package: DBM/DBA related
PHP Version: 5.1.2 OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: myckel at sdf dot lonestar dot org
New email:
PHP Version: OS:

 

 [2006-04-23 15:21 UTC] myckel at sdf dot lonestar dot org
Description:
------------
Since my last distro php upgrade I can't open a DBA file with the "rdt" modifier (on a non-opened file). It gives an error on a n incompatible modifier combo. The PHP version is: PHP Version 5.1.2-pl1-gentoo

Reproduce code:
---------------
<?php

/* config.db4 exists, but isn't opened */
dba_open("config.db4",rdt,db4);

?>

Expected result:
----------------
Empty page, no errors.

Actual result:
--------------
HTTP server returns the following error:

Warning: dba_open(config.db4,rdt) [function.dba-open]: You cannot combine modifiers - (no lock) and t (test lock) in /var/www/localhost/htdocs/test.php on line 4

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-23 15:29 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-04-23 18:23 UTC] myckel at sdf dot lonestar dot org
Tried to build the latest snapshot and installed. phpinfo() gave: PHP Version 5.1.3RC4-dev (as confirmation that the latest php is in use).

But the bug keeps appearing when I tried the script again. Seems that the bug isn't fixed yet.
 [2006-04-23 19:27 UTC] tony2001@php.net
Marcus, you broke it by this commit:
http://cvs.php.net/viewcvs.cgi/php-src/ext/dba/dba.c?r1=1.111&r2=1.112
 [2006-04-24 01:25 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

The real error is that php has to use th elock provided by the lib. This is being solved with 5.1.3. Now unfortunatley this does not allow to test whether the db file is being locked.
 [2006-04-24 15:07 UTC] myckel at sdf dot lonestar dot org
http://www.php.net/manual/en/function.dba-open.php doesn't mention this change, or will the use of this "t" modifier be fixed (that it can be used again) in a later version?

Also the error warning might be made more descriptive IMHO.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC