From: zajdee at seznam dot cz
Operating system: Windows NT4
PHP version: 5CVS-2004-05-08 (dev)
PHP Bug Type: Directory function related
Bug description: chdir("..") not working in PHP5 on WinNT4
Description:
------------
Hi,
I've found a bug in PHP5 on Windows NT4 operating system. I think it is
somewhere in the PHP virtual directory handling, but haven't found more
informations yet.
In short -- chdir("..") doesn't work as expected.
It doesn't occur on Windows XP (2000 not checked), but in Windows NT4 when
I run the code below I get the wrong results: relative chdir actually
takes a webserver root directory as a source for it's change, instead of
the current virtual directory (which is what everyone expects).
As the result, lots of scripts don't work (e.g. phpMyAdmin's css/php
script, my own scripts that use chdir("..), etc.)
This bug AFAIK does not appear in PHP4.
Reproduce code:
---------------
<?
echo getcwd()."<br/>\n";
echo chdir("../")."<br/>\n";
echo getcwd()."<br/>\n";
?>
Expected result:
----------------
E:\www\dirtest (script own directory)
1 (chdir was successfull)
E:\www (working directory after chdir)
Actual result:
--------------
E:\www\dirtest (script own directory)
1 (chdir was successfull)
D:\Program Files\Apache Group\Apache2 (working directory after chdir --
wrong)
--
Edit bug report at http://bugs.php.net/?id=28327&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28327&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28327&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28327&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28327&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28327&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28327&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28327&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28327&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28327&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28327&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28327&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28327&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28327&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28327&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28327&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28327&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28327&r=float