#28327 [Fbk->Opn]: chdir("..") not working in PHP5 on WinNT4

From: Date: Thu, 27 Jan 2005 07:15:17 +0000
Subject: #28327 [Fbk->Opn]: chdir("..") not working in PHP5 on WinNT4
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72916@lists.php.net to get a copy of this message
 ID:               28327
 User updated by:  zajdee at seznam dot cz
 Reported By:      zajdee at seznam dot cz
-Status:           Feedback
+Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows NT4
 PHP Version:      5CVS-2004-05-08 (dev)
 New Comment:

I am not using NT4 anywhere, but will try to set up a virtual machine
in VMware to test it.


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

[2005-01-26 04:53:57] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



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

[2004-05-09 14:53:17] zajdee at seznam dot cz

Of course, it works fine with Apache2+PHP4.3.6 on the same system...

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

[2004-05-09 09:31:07] vkatragadda at email dot com

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

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

[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 (#72916) next »