#28327 [Com]: chdir("..") not working in PHP5 on WinNT4

From: Date: Sun, 09 May 2004 07:31:08 +0000
Subject: #28327 [Com]: chdir("..") not working in PHP5 on WinNT4
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59412@lists.php.net to get a copy of this message
 ID:               28327
 Comment by:       vkatragadda at email dot com
 Reported By:      zajdee at seznam dot cz
 Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows NT4
 PHP Version:      5CVS-2004-05-08 (dev)
 New Comment:

did u run this script on [WinNT4 + PHP4]?


Previous Comments:
------------------------------------------------------------------------

[2004-05-08 15:58:22] zajdee at seznam dot cz

I forgot to tell anything about my config:

PHP 5.0.3RC-dev, Apache2, php loaded as module, binaries from
snaps.php.net, running on Windows NT4 Server EN

------------------------------------------------------------------------

[2004-05-08 14:38:24] zajdee at seznam dot cz

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 this bug report at http://bugs.php.net/?id=28327&edit=1


Thread (13 messages)

« previous php.bugs (#59412) next »