php.net |  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
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: steveb at talltree dot com
New email:
PHP Version: OS:

 

 [2003-06-24 12:01 UTC] steveb at talltree dot com
Description:
------------
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:

  <?
    chdir("subdir");
    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.


Patches

Pull Requests

History

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

 [2003-06-28 09:46 UTC] helly@php.net
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 http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net 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: Thu Dec 26 23:01:28 2024 UTC