FATAL ERROR: No such file or directory in Unknown on line 0

2

After the system update (for Windows 10 1709) started giving the following error in PHP execution:

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

Fatal error: Unknown: Failed opening required 'D:\...\index.php' (include_path='C:\xampp\php\pear') in Unknown on line 0

This happens both if you use php Built-In ( php -S 0.0.0.0:80 ) as if using the XAMPP apache service.

However, if you run the same project from the C: drive (the drive where XMPP is installed) the error does not occur.

Can anyone explain why this behavior?

Note: Note that the error is in the Unknown file on the 0 line ... that is, it is completely lost. Also note that the error did not occur before Windows refreshed. The error persisted even after reinstalling XAMPP

    
asked by anonymous 18.10.2017 / 13:28

1 answer

1

Since it was working before the upgrade, it should be something to do with it.

This type of error usually occurs when Apache or PHP does not have access to the project files / folder.

It may be that the permissions on the D drive or the project folder (or some folder it inherits from) have been changed in the upgrade.

To verify this, right-click the project folder, property, security tab, and then click Advanced. There you will see permissions and ownership of the folder.

Another possibility would be OneDrive . In Windows 1709 it passes improved behavior (due to on-demand sending) and needs larger permissions on the folder where it acts.

If you have OneDrive active, and your project folder is in it, you will not be able to use the built-in one or Apache (at least until Microsoft solves this, if at all). >

If this is the case, I recommend that you put your project outside of Onedrive and send only the final versions of each update. So you keep your files linked without losing the ownership of the folder. (Even if you use a versioner such as Git, it is not recommended to have OneDrive, Google Drive, or other active cloud storage in the same folder, because the versioner updates several files with each commit, and the application that Cloud storage can get lost.

I hope I have helped.

    
19.10.2017 / 12:27