Bug #75384 [NEW]: PHP seems incompatible with OneDrive files on demand
| From: | phpbugs at dougweb dot org | Date: | Sun, 15 Oct 2017 18:01:58 +0000 |
| Subject: | Bug #75384 [NEW]: PHP seems incompatible with OneDrive files on demand | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-211702@lists.php.net to get a copy of this message | ||
From: phpbugs at dougweb dot org
Operating system: Windows 10
PHP version: 7.1.10
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:PHP seems incompatible with OneDrive files on demand
Description:
------------
It would seem that the new "Files on Demand" feature of OneDrive in the
Windows fall update causes issues with PHP's ability to open files. In
theory according to MS this should be invisible to applications but
there's definitely something screwy going on with PHP.
(https://support.office.com/en-us/article/Learn-about-OneDrive-Files-On-Demand-0e6860d3-d9f3-4971-b321-7092438fb38e?ui=en-US&rs=en-US&ad=US&fromAR=1).
Any attempt to iterate through files in a folder, or even simply do a
"require" results in PHP somehow not being able to see them. This
applies even if the files are locally available on the PC, the only
thing needed to trigger this is to have Files on Demand enabled and to
have the source located somewhere within the OneDrive folder.
Moving the source code to any other folder makes things work normally.
Weirdly, PHP does seem to be able to read the initial file it's asked to
execute, it's only secondary files it's unable to load.
This may or may not help debugging, but if I install Ubuntu into Windows
10 via the Windows Store, and execute PHP scripts in the OneDrive folder
from Linux (so PHP is using the Linux file APIs, with the MS shim
converting them to the Windows ones) then that works fine.
Test script:
---------------
1) On a recent Windows Insider Build (or wait until RTM in a few days)
2) Enable OneDrive, and the "Files on Demand" feature
Then in your OneDrive folder, create 2 files
Foo.php
<?php
require 'Bar.php';
Bar.php
<?php
echo 'Require worked';
Then run php Foo.php
Expected result:
----------------
See "Require worked" output to the screen
Actual result:
--------------
PHP Warning: require(Bar.php): failed to open stream: No such file or
directory
in Foo.php on line 2
Warning: require(Bar.php): failed to open stream: No such file or
directory in F
oo.php on line 2
PHP Fatal error: require(): Failed opening required 'Bar.php'
(include_path='.;
C:\php\pear') in Foo.php on line 2
Fatal error: require(): Failed opening required 'Bar.php'
(include_path='.;C:\ph
p\pear') in Foo.php on line 2
--
Edit bug report at https://bugs.php.net/bug.php?id=75384&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75384&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75384&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75384&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75384&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75384&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75384&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75384&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75384&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75384&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75384&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75384&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75384&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75384&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75384&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75384&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75384&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75384&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75384&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75384&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75384&r=mysqlcfg