php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25115 can't open db3 file with a path
Submitted: 2003-08-17 06:51 UTC Modified: 2003-08-18 19:08 UTC
From: courtois at nouvo dot com Assigned: helly (profile)
Status: Not a bug Package: DBM/DBA related
PHP Version: 4.3.2 OS: win32
Private report: No CVE-ID: None
 [2003-08-17 06:51 UTC] courtois at nouvo dot com
Description:
------------
db3 open doesn't work with a path including directories.

windows XP
Apache 2
PHP 4.3.2 zip package [6,107Kb] - 29 May 2003 (from www.php.net)

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

header('Content-type: text/plain');

mkdir("foobar",0755);

print "testflat :";
if ($id = dba_open ("testflat", "n", "flatfile")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

print "testdb3 :";
if ($id = dba_open ("testdb3", "n", "db3")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

print "foobar/testflat :";
if ($id = dba_open ("foobar/testflat", "n", "flatfile")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

print "foobar/testdb3";
if ($id = dba_open ("foobar/testdb3", "n", "db3")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

chdir("foobar");
print "change to dir foobar\n";

print "foobar/testflat-cd :";
if ($id = dba_open ("testflat-cd", "n", "flatfile")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

print "foobar/testdb3-cd :";
if ($id = dba_open ("testdb3-cd", "n", "db3")) { print "ok\n"; dba_close ($id); } else print "not ok\n";

?>

Expected result:
----------------
I expect foobar/testdb3 to be opened correctly.

same result when / is replaced with \

Actual result:
--------------
testflat :ok
testdb3 :ok
foobar/testflat :ok
foobar/testdb3<br />
<b>Warning</b>:  dba_open(foobar/testdb3,n): Driver initialization failed for handler: db3: No such file or directory in <b>C:\Program Files\Apache Group\Apache2\htdocs\testdba.php</b> on line <b>17</b><br />
not ok
change to dir foobar
foobar/testflat-cd :ok
foobar/testdb3-cd :ok

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-18 09:54 UTC] courtois at nouvo dot com
could this bug be related with #23975 ???

I tested also the latest CVS package: php4-win32-STABLE-200308181230.zip

same results :-(
 [2003-08-18 14:08 UTC] helly@php.net
Duplicate of #23957
 [2003-08-18 19:08 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

bug #23975
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 11:01:30 2024 UTC