ID: 28327 Updated by: [EMAIL PROTECTED] Reported By: zajdee at seznam dot cz -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: Windows NT4 PHP Version: 5CVS-2004-05-08 (dev) New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [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
