#34842 [Fbk->Opn]: Can't "chdir('./../');" when parent dir equals root dir

From: Date: Mon, 17 Oct 2005 20:18:13 +0000
Subject: #34842 [Fbk->Opn]: Can't "chdir('./../');" when parent dir equals root dir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86666@lists.php.net to get a copy of this message
ID: 34842 User updated by: marcel at hjortronet dot se Reported By: marcel at hjortronet dot se -Status: Feedback +Status: Open Bug Type: IIS related Operating System: Windows Server 2003 PHP Version: 5CVS-2005-10-12 (snap) New Comment: Yes, the results are exactly the same using Apache HTTPd v2.0.55 (Win32) and PHP (php5.1-win32-200510171430). I've just verified the test/results myself. Sincerely // Marcel Previous Comments: ------------------------------------------------------------------------ [2005-10-12 23:36:40] tony2001@php.net Are you able to reproduce it with Apache ? ------------------------------------------------------------------------ [2005-10-12 23:22:27] marcel at hjortronet dot se Description: ------------ Consider this example web server: 'D:\wwwroot\myweb\' (published as http://www.myweb.com/) IF the web servers access (or actually the 'IUSR_<computername>' user which enables IIS anonymous web access) is restricted to 'D:\wwwroot\myweb\' directory (and its subdirectories) and is not allowed to access any other local directory, like for example 'D:\wwwroot\', the code below ('chdir("../")') won't function if it is put into 'D:\wwwroot\myweb\test\' (published as http://www.myweb.com/test/reproducecode.php). Otherwise, thanks for doing a wonderful job! //Marcel, Sweden Reproduce code: --------------- <? echo getcwd()."<br/>\n"; echo chdir("../")."<br/>\n"; echo getcwd()."<br/>\n"; ?> Expected result: ---------------- D:\wwwroot\myforum\test 1 D:\wwwroot\myforum Actual result: -------------- D:\wwwroot\myforum\test D:\wwwroot\myforum\test ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34842&edit=1

« previous php.bugs (#86666) next »