php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28122 dba_open db3: Permission denied
Submitted: 2004-04-23 14:34 UTC Modified: 2004-05-10 03:50 UTC
From: p dot vandenbeld at wanadoo dot nl Assigned: helly (profile)
Status: Closed Package: DBM/DBA related
PHP Version: 4.3.6 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: p dot vandenbeld at wanadoo dot nl
New email:
PHP Version: OS:

 

 [2004-04-23 14:34 UTC] p dot vandenbeld at wanadoo dot nl
Description:
------------
dba_open() failed in combination with berkeley db3 file.
db3 handler doesn't seem to work correctly. I tried to call dba_open() on a non-existing database (named database.bd). The function call dba_open("c:\database.db","c","db3") failed. The same goes for option "n" instead of "c". In both cases the file is created with a size of 0 bytes. It seems as if the handler is not able to do anything with the file. Apparently on read we get a permission failure. All users have read and write access to the file. I use Apache 2.0.49 as webserver in combination with PHP as SAPI module. 


Reproduce code:
---------------
$file = "c:\database.db";

$berk_handle = dba_open($file, "c","db3");

dba_close( $berk_handle );



Expected result:
----------------
Code should have 
- created  a database.db file (it actually has ...)
- returned a handler


Actual result:
--------------
Error (note: some of the directories have been shortened): 
Notice: dba_open(): read: 0x572e14c, 256: Permission denied in C:\wwwroot\berk.inc.php on line 7

Notice: dba_open(): c:\database.db: Permission denied in C:\wwwroot\berk.inc.php on line 7

Warning: dba_open(c:\database.db,c): Driver initialization failed for handler: db3: Permission denied in C:\wwwroot\berk.inc.php on line 7


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-10 03:50 UTC] helly@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 10:01:27 2024 UTC