|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24317 chdir doesn't affect dba_open
Submitted: 2003-06-24 12:01 UTC Modified: 2003-06-28 09:46 UTC
From: steveb at talltree dot com Assigned: helly (profile)
Status: Closed Package: DBM/DBA related
PHP Version: 4.3.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: steveb at talltree dot com
New email:
PHP Version: OS:


 [2003-06-24 12:01 UTC] steveb at talltree dot com
Apparently, dba_open doesn't respect chdir in Windows 32.  I filed this against IIS only because I believe it's Win32 specific - this problem doesn't reproduce on my web hosting provider's Linux/Apache server (running php 4.1).  I don't think this bug has anything to do with the IIS server, as it reproduces from the CLI.

I also observed that on the Unix box, dba_open("foo","w") will create "foo" if it doesn't exist, whereas on my Windows box you need to specify "n" or "c" to create a file.  Don't know whether that's a version difference or a bug.

Reproduce code:
To reproduce:

    fopen( "textfile", "w" );
    dba_open( "database", "n", "db3" );

Expected result:
"textfile" and "database" should both be created in "subdir".

Actual result:
"textfile" gets created in "subdir", but "database" is created in the parent directory.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-26 12:04 UTC]
If fopen() works, but dba_open() doesn't it's definately some DBA problem.

 [2003-06-28 09:46 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
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 May 26 08:01:31 2024 UTC