|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78220 Can't access OneDrive folder
Submitted: 2019-06-27 12:34 UTC Modified: 2019-08-19 12:52 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: simon dot aberle at mm-bit dot de Assigned: cmb (profile)
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 7.3.6 OS: Windows 10 Pro Version 1903
Private report: No CVE-ID: None
 [2019-06-27 12:34 UTC] simon dot aberle at mm-bit dot de
If I try to see a folder content via glob or scandir the returning array is empty all the time.

The problem also occurs if I try to load a file via fopen or file_get_contents.

This problem occurs since I did update my OS with the May 2019 update which seems to broke this functionality. Seems like Microsoft did change something on their access rights.

The same problems appear on the computer of one of my colleague after updating his os as well. Running the code on a computer where the newest patch is not installed yet everything just work file.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-27 16:45 UTC]
-Status: Open +Status: Feedback
 [2019-06-27 16:45 UTC]
Do you have any specific information besides that it doesn't work? Errors? Process Monitor log?
And are these files hosted on OneDrive?
 [2019-06-28 06:08 UTC] simon dot aberle at mm-bit dot de
-Status: Feedback +Status: Open
 [2019-06-28 06:08 UTC] 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.
 [2019-06-28 07:35 UTC] 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 11:05 UTC]
-Assigned To: +Assigned To: cmb
 [2019-08-09 15:45 UTC]
-Status: Assigned +Status: Verified
 [2019-08-09 18:15 UTC]
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

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] <>
[2] <>
[3] <>
 [2019-08-19 12:52 UTC]
-Summary: Can't save to file system outside of project folder +Summary: Can't access OneDrive folder
 [2019-08-19 12:52 UTC]
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.
 [2019-08-19 18:00 UTC]
Automatic comment on behalf of
Log: Fix #78220: Can't access OneDrive folder
 [2019-08-19 18:00 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 17:01:27 2019 UTC