This was my httpd-vhosts.conf
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Since I travel a lot and use different systems/laptops while traveling, I will like to save and develop my projects from OneDrive/Cloud so that I can work on my projects at anytime from any system.
So I make the server and www directories in my OneDrive and changed the Server Directory to
DocumentRoot "C:/Users/user/OneDrive/server/www"
<Directory "C:/Users/user/OneDrive/server/www/">
After copying a project in OneDrive, I am getting following error whenever I load localhost 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 'C:/Users/user/OneDrive/server/www/project/index.php' (include_path='.;C:\php\pear') in Unknown on line 0
If I change back the server directory to previous location of www directory, i.e. "c:/wamp64/www" the error is gone. Seems this error pops up for every other www location rather than the installation directory. Any help will be grateful.
Thanks
EDIT
It's not for just index.php, it's for any file. No file is able to load and same error is being popped-out. Even if the file contains not a single line of code.