Bug #69834 [Com]: is_readable returns false for Windows Offline File, but file can be read

From: Date: Wed, 23 Dec 2015 23:31:26 +0000
Subject: Bug #69834 [Com]: 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-198186@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 Comment by: ulf at dvlp dot de 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 Type: Bug Package: *Directory/Filesystem functions Operating System: Windows 7 PHP Version: 5.6.10 Block user comment: N Private report: N New Comment: Same Problem with PHP 7.0.0 on Windows 10. Previous Comments: ------------------------------------------------------------------------ [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 (#198186) next »