Bug #69834 [Opn->Fbk]: is_readable returns false for Windows Offline File, but file can be read

From: Date: Thu, 29 Jul 2021 16:37:34 +0000
Subject: Bug #69834 [Opn->Fbk]: is_readable returns false for Windows Offline File, but file can be read
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235461@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69834&edit=1 ID: 69834 Updated by: cmb@php.net Reported by: arnout dot boks at moxio dot com Summary: is_readable returns false for Windows Offline File, but file can be read -Status: Open +Status: Feedback Type: Bug Package: *Directory/Filesystem functions Operating System: Windows 7 PHP Version: 5.6.10 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Is this still an issue with any of the actively supported PHP versions[1]? If so, what does fsutil reparsePoint query U: report (both offline and online mode)? [1] <https://www.php.net/supported-versions.php> Previous Comments: ------------------------------------------------------------------------ [2016-11-16 14:52:25] cmb@php.net Related To: Bug #73543 ------------------------------------------------------------------------ [2015-12-23 23:31:24] ulf at dvlp dot de Same Problem with PHP 7.0.0 on Windows 10. ------------------------------------------------------------------------ [2015-06-15 08:24:54] arnout dot boks at moxio dot com Description: ------------ PHP's is_readable function seems to always return false for a file that has been made available offline using the Windows Offline Files functionality (http://windows.microsoft.com/en-us/windows/understanding-offline-files#1TC=windows-7) in offline mode, even if the file can be read using fread and related functions. If the offline share is put back into online mode, is_readable returns true again. I experience this problem both for shares hosted on Windows and on Linux (using Samba). Test script: --------------- <?php // 'U:' is network share that has been made 'Always available' using Windows Offline Files // 'test.txt' is an existing file that can be read and written by the user running PHP var_dump(is_readable('U:/test.txt')); $fp = fopen('U:/test.txt', 'r'); var_dump($fp); Expected result: ---------------- bool(true) resource(#) of type (stream) Actual result: -------------- // When the share is in offline mode ('Work offline') bool(false) resource(5) of type (stream) // When the share is in online mode ('Work online') bool(true) resource(5) of type (stream) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69834&edit=1

« previous php.bugs (#235461) next »