Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/School/OneDrive - Noorderpoort/PHP/htdocs/Jaar1/Blok1/Les7/oefening16.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
After a long windows update I suddenly get this error when I try to open a php file through the localhost.
How can I solve this problem?
Problem is caused by the new 'On Demand' feature in OneDrive. MS/OneDrive creates placeholder files in your OneDrive folders, and downloads them as needed - but apparently not in response to php attempting to access those files.
Solution is to disable on-demand, or, mark your php files for 'always keep on this device': In explorer, right click on the folder that you are using for your php files (ie your webserver document root directory) and select the option "Always keep on this device". This will force OneDrive to keep a valid/full copy of the file, and php should no longer have a problem reading it.
You may need to wait a while for the files to be downloaded - OneDrive seems to queue them up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With