Bug #73884 [Fbk->Csd]: is_dir() returns false for junction / symlinkd

From: Date: Mon, 23 Jan 2017 10:54:38 +0000
Subject: Bug #73884 [Fbk->Csd]: is_dir() returns false for junction / symlinkd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206875@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73884&edit=1

 ID:                 73884
 Updated by:         ab@php.net
 Reported by:        kulakov74 at yandex dot ru
 Summary:            is_dir() returns false for junction / symlinkd
-Status:             Feedback
+Status:             Closed
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   Windows 8.1
 PHP Version:        7.1.0
-Assigned To:        
+Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

Great! So it was same issue, just a more lucky reproducer. NTFS always handles filenames in UTF-16,
the OS created links are no diff and was suffering from the bug in the realpath conversion, not
because they were differently encoded.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2017-01-21 12:55:22] kulakov74 at yandex dot ru

I tried "PHP 7.1.2-dev (cli) (built: Jan 21 2017 08:06:44)", the issue with links to
cyrilic targets is now solved for UTF-8 as well (it did work correct for Windows-1251, not it works
for both).

------------------------------------------------------------------------
[2017-01-21 11:22:42] ab@php.net

@kulakov74, may I ask you to check the latest snapshots again? The fix for bug #73962 might be
related to this issue.

Thanks.

------------------------------------------------------------------------
[2017-01-12 21:50:13] ab@php.net

Oh, that's interesting. That's a good spot then. Were some how new to me. Or more
precisely - of course, it's possible to use another encoding, weird is it's done on system
supplied objects :/ Any FS objects created/read by PHP or other programs correctly handling Unicode,
is fine with 7.1. Your workaround is actually documented in UPGRADING ;) - if there's need to
work with incompatible items, etc., normally configuring for the system codepages would be fine.

So is_dir() and other works as expceted, when you set another codepage? In that case, the issue
might be resolved.

Thanks.

------------------------------------------------------------------------
[2017-01-12 20:06:07] kulakov74 at yandex dot ru

>>sure the file is UTF-8 encoded? 
Yes, but it doesn't even matter cause the point is in the targets' charset. 

Tested again on Win 8.1, and the trick with default_charset=Windows-1251 worked again :)

------------------------------------------------------------------------
[2017-01-12 15:59:41] ab@php.net

Hmm, you previous 4 runs was on console. In the last snippet you show - sure the file is UTF-8
encoded? The hardcoded data have to be in same encoding as the one configured in INI. In PHP before
7.1, the ANSI APIs are used, so the encoding INI doesn't affect anything. I was earlier not
able to reproduce issues with any of the 4 runs you've shown earlier, including the ones with
multibyte dir/junction, as linked in the post above. To me, it still seems as a permission issue
with the specific path on your side.

There's probably no way around, other than me to ask you to please pack an isolated stable
repro case. Too much time spent with just shooting in the sky :( 

Thanks.

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


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=73884


--
Edit this bug report at https://bugs.php.net/bug.php?id=73884&edit=1


Thread (16 messages)

« previous php.bugs (#206875) next »