Bug #78220 [Ver]: Can't access OneDrive folder
| From: | cmb@php.net | Date: | Mon, 19 Aug 2019 12:52:27 +0000 |
| Subject: | Bug #78220 [Ver]: Can't access OneDrive folder | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222317@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78220&edit=1
ID: 78220
Updated by: cmb@php.net
Reported by: simon dot aberle at mm-bit dot de
-Summary: Can't save to file system outside of project folder
+Summary: Can't access OneDrive folder
Status: Verified
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Windows 10 Pro Version 1903
PHP Version: 7.3.6
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I have now compared the behavior of Windows 10 1809, and while the
OneDrive folder (on-demand enabled) is reported as reparse point
by
fsutil and dir /al, FindFirstFile() doesn't report it as
reparse point, so there are no issues accessing the folder.
Previous Comments:
------------------------------------------------------------------------
[2019-08-13 16:27:42] cmb@php.net
Related To: Bug #75384
------------------------------------------------------------------------
[2019-08-09 18:15:35] cmb@php.net
When PHP gets information about the OneDrive folder[1],
dataw.dwFileAttributes is 0x431, which indicates a reparse point.
The folder is then opened[2] to get information about the
reparse point[3]. However, that operation fails with the error
ERROR_NOT_A_REPARSE_POINT.
This happens only when On-Demand is enabled; if it is disabled,
the folder is not reported as a reparse point in the first place.
[1] <https://github.com/php/php-src/blob/php-7.3.8/Zend/zend_virtual_cwd.c#L843>
[2] <https://github.com/php/php-src/blob/php-7.3.8/Zend/zend_virtual_cwd.c#L886>
[3] <https://github.com/php/php-src/blob/php-7.3.8/Zend/zend_virtual_cwd.c#L906>
------------------------------------------------------------------------
[2019-06-28 11:05:42] cmb@php.net
Further details on StackOverflow:
<https://stackoverflow.com/questions/56791646/php-file-loading-or-listing-operations-not-working>
------------------------------------------------------------------------
[2019-06-28 07:35:56] simon dot aberle at mm-bit dot de
After some tests I can provide the following additional information
If I run the script with the Windows subsystem for Linux (Ubuntu) the file listing and loading is
working just fine. This result is not depending on the OneDrive state (Running/Stopped)
Disabling OneDrive or stopping the sync will not fix the problem with the default Windows command
line.
------------------------------------------------------------------------
[2019-06-28 06:08:05] simon dot aberle at mm-bit dot de
You are totally right the folders I did try to load the data from are hosted via OneDrive but saved
on my local HDD.
The only errors I get are the default ones if a file is not present:
PHP Warning: scandir(): Die Datei oder das Verzeichnis ist kein Analysepunkt. (code: 4390) in
file_get_contents(): failed to open stream: No such file or directory in
I can try to create a process monitor log to track down the problem if you tell me how.
------------------------------------------------------------------------
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=78220
--
Edit this bug report at https://bugs.php.net/bug.php?id=78220&edit=1