|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69834 is_readable returns false for Windows Offline File, but file can be read
Submitted: 2015-06-15 08:24 UTC Modified: -
Avg. Score:3.0 ± 1.6
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: arnout dot boks at moxio dot com Assigned:
Status: Open Package: *Directory/Filesystem functions
PHP Version: 5.6.10 OS: Windows 7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-06-15 08:24 UTC] arnout dot boks at moxio dot com
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 ( 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:
// '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
$fp = fopen('U:/test.txt', 'r');

Expected result:
resource(#) of type (stream)

Actual result:
// When the share is in offline mode ('Work offline')
resource(5) of type (stream)

// When the share is in online mode ('Work online')
resource(5) of type (stream)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-23 23:31 UTC] ulf at dvlp dot de
Same Problem with PHP 7.0.0 on Windows 10.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jun 13 00:01:24 2021 UTC