Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows updateWarning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Tags:

php

xampp

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?

like image 721
James Jansen23 Avatar asked Dec 23 '22 12:12

James Jansen23


1 Answers

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.

like image 148
Eddie Avatar answered Dec 28 '22 08:12

Eddie