From: courtois at nouvo dot com Operating system: win32 PHP version: 4.3.2 PHP Bug Type: DBM/DBA related Bug description: can't open db3 file with a path
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 -- Edit bug report at http://bugs.php.net/?id=25115&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25115&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25115&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25115&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25115&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25115&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25115&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25115&r=support Expected behavior: http://bugs.php.net/fix.php?id=25115&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25115&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25115&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25115&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25115&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25115&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25115&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25115&r=gnused