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

From: Date: Sun, 08 Aug 2021 04:22:13 +0000
Subject: Bug #69834 [Fbk->NoF]: 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-235668@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:       php-bugs@lists.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:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *Directory/Filesystem functions
 Operating System: Windows 7
 PHP Version:      5.6.10
 Assigned To:      cmb
 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:
------------------------------------------------------------------------
[2021-07-29 16:37:34] cmb@php.net

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>

------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#235668) next »