Running php files stored on OneDrive

Viewed 5543

I am developing a php project, having the project files stored on OneDrive so that I can access them from anywhere.

I have set up XAMPP, with a VirtualHost pointing to my project folder inside OneDrive so that I can run it in my browser.

This has been working great up until yesterday, when OneDrive started crashing and I had to reinstall it. Now I'm no longer able to run php files stored on OneDrive.

I get this error in my browser:

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

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

My OneDrive folder is D:\OneDrive. If I set up a VirtualHost pointing to D:\, I am able to run files such as D:\index.php or D:\MyProject\index.php in my browser. But I'm not able to run files such as D:\OneDrive\index.php or D:\OneDrive\MyProject\index.php.

Does anyone have an idea what might cause this issue?

Edit:

The issue does not seem to be related to .htaccess, as the behavior is independent of whether a .htaccess file exists in the project folder or not.

Here is my VirtualHost, in case anyone is interested:

<VirtualHost *:80>
    ServerAdmin webmaster@myproject.com
    DocumentRoot "D:/OneDrive/MyProject/"
    ServerName myproject.com
    ServerAlias www.myproject.com 

    <Directory "D:/OneDrive/MyProject/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local
    </Directory>
</VirtualHost>
4 Answers

This bug is not fixed still. After Windows 10 May 2019 Update, the bug reappeared and it's not fixed by Microsoft.

I think is fixed now (2018-11-26) - Now, sites are working again in OneDrive. I'm sure it was a OneDrive app problem that was fixed recently.

Related