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 [email protected]
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>
I've not been able to solve the issue, but I've found a workaround:
With this setup I'm able to run my PHP application, since the project files are not physically located in the OneDrive folder, and the project files are still uploaded and backed up on OneDrive due to the symbolic link.
This bug is not fixed still. After Windows 10 May 2019 Update, the bug reappeared and it's not fixed by Microsoft.
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