Bug #73797 [Fbk->NoF]: __DIR__ !== getcwd()

From: Date: Sun, 05 Feb 2017 04:22:24 +0000
Subject: Bug #73797 [Fbk->NoF]: __DIR__ !== getcwd()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207179@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73797&edit=1 ID: 73797 Updated by: php-bugs@lists.php.net Reported by: anrdaemon at freemail dot ru Summary: __DIR__ !== getcwd() -Status: Feedback +Status: No Feedback Type: Bug Package: Filesystem function related Operating System: Windows PHP Version: 7.1.0 Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2017-01-26 06:26:57] anrdaemon at freemail dot ru You did not set it up as described. Your tests are not valid. ------------------------------------------------------------------------ [2017-01-24 10:43:53] requinix@php.net C:\Users\*>mklink /j %temp%\test.dir C:\users\Public\Desktop Junction created for C:\Users\*\AppData\Local\Temp\test.dir <<===>> C:\users\Public\Desktop C:\Users\*>cd %temp%\test.dir C:\Users\*\AppData\Local\Temp\test.dir>echo ^<^?php print __DIR__ . ^"\n^"; print getcwd() . ^"\n^"; > test.php Access is denied. C:\Users\*\AppData\Local\Temp\test.dir>*\php-7.1.0-nts-Win32-VC14-x64\php.exe -r "echo __DIR__; echo getcwd();" C:\Users\*\AppData\Local\Temp\test.dirC:\Users\*\AppData\Local\Temp\test.dir The actual output does matter. You can redact portions if you want but only as long as it doesn't change the meaning of the path. Your repro works fine for both me and @narf. *You* are the one with the unusual output so *you* must be the one who provides the exact details. ------------------------------------------------------------------------ [2017-01-24 10:34:16] anrdaemon at freemail dot ru Literal output doesn't matter. (Though, you could easily predict it.) The fact that the output differs - matters. If "your environment" provides any different results, please describe exact steps you've made to set it up. As well as exact versions of OS and PHP used. ------------------------------------------------------------------------ [2017-01-19 15:17:04] narf at devilix dot net It might be helpful if you provide the actual/literal outputs that you get, as opposed to just describing them with words. In my environment for example, all three of getcwd(), __DIR__ and realpath(__DIR__) return the same result, so it is unclear what you mean by "realpath()'d". ------------------------------------------------------------------------ [2016-12-21 04:26:39] anrdaemon at freemail dot ru Another interesting script to run in this directory: <?php print getcwd() . "\n"; chdir(getcwd()); print getcwd() . "\n"; chdir(getcwd()); print getcwd() . "\n"; chdir(getcwd()); print getcwd() . "\n"; ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=73797 -- Edit this bug report at https://bugs.php.net/bug.php?id=73797&edit=1

« previous php.bugs (#207179) next »