ID: 44777 Comment by: don dot lebert at crystaltech dot com Reported By: toby at simmonsconsulting dot com Status: Open Bug Type: IIS related Operating System: Windows 2003 Server PHP Version: 5.2.5 New Comment:
I too am still having this problem which was originally posted here: http://bugs.php.net/bug.php?id=43309&edit=2 Previous Comments: ------------------------------------------------------------------------ [2008-06-04 19:30:23] asset at impactdamage dot com I am having this same issue, however I get this when using either ISAPI or FASTCGI. It can be resolved by giving list folder permissions on the parent folder. I cant seem to find a workaround to this, as in a shared environment I dont want to give list permissions on the parent. ------------------------------------------------------------------------ [2008-04-18 14:49:27] toby at simmonsconsulting dot com FYI, PHP CGI/FastCGI does not have this problem. ------------------------------------------------------------------------ [2008-04-18 14:44:15] toby at simmonsconsulting dot com Description: ------------ PHP ISAPI under IIS 6.x (Windows 2003 Server) reports an inconsistent working directory ONLY in the root of a web site. The working directory is perfectly consistent when checked in a subdirectory of a web site. I have seen similar bugs reported but they were either BOGUS or no longer open. I understand ISAPI is unstable (according to Bug #42460) but this bug only seems to occur in the root of a web site. Say the root of your web site is D:\websites\testsite. If you create a php file with the following code: <?php echo getcwd()."<br />\n"; ?> and place it in the above directory then load it (http://testsite/cwd.php), loading will produce a random directory. If you place this file in a subdirectory, say D:\websites\testsite\testdir, and load the page (from the new location, http://testsite/testdir/cwd.php) it will produce the expected results: D:\websites\testsite\testdir. Reproduce code: --------------- <?php echo getcwd()."<br />\n"; ?> Expected result: ---------------- In the root folder of your website (say, D:\websites\testsite) you would expect D:\websites\testsite. In a subdirectory of your website (say, D:\websites\testsite\testdir) you would expect just that, D:\websites\testsite\testdir. Actual result: -------------- In the root folder of your website (say, D:\websites\testsite) you get random results, anything from C:\WINDOWS\System32 to various subdirectories in your website (or other websites if you host more than one.) In a subdirectory of your website (say, D:\websites\testsite\testdir) it seems to work fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44777&edit=1