We have been trying many things this entire day now.
I use Xampp since forever to run my localhost websites.
Now a new employee has installed Xampp to work on his localhost too, but unlike me he cannot access his file directory.
And Ajaxcalls cannot find the files as well.
Our installations are not in C:/xampp/htdocs but are directed to a another folder (C:/projects/{projectname}). This is done in httpd.conf on the 2 places below, this always worked perfectly for me:
- Code: Select all
DocumentRoot "C:/projects/{projectname}"
<Directory "C:/projects/{projectname}">
When I would go to 'localhost/api/' I would see all the files inside this folder, or even go to 'localhost/api/test.php' I would execute this file.
However my colleague (and another one in the past as well) get's a 404.
This also works when doing ajaxcalls, so even javascript cannot find the files with for example (`ajaxRequest.open('POST', './api/testreportsajax.php', true); `) (other URL variants don't change this, e.g. location.host + {url}), they all return 404.
p.s. The urls are correct, no need to comment on that, I have been doing this a long time.
If I put my documentroot on "c:/" I can even access my c:/windows files
We have been trying an endless amount of things, adding htaccess files with rewritecond, changing values in php.ini and httpd.conf, putting them on AllowOverride All & Require all granted.
Bottom line is, he cannot see his folder structure when opening localhost through the browser and also javascript cannot find the files (only php finds the includes and requires). Thus all our API calls don't work with Ajax.
Initially he downloaded the latest version, but he even downgraded the version to my version.
Not only that but we literally used a notepad++ plugin (compare) to compare every single config and ini file, which were similar or made similar.
Also changing ports didn't help.
Question is: What is causing him to not be able to access his filesystem through the browser's address bar, and more importantly, how do we fix it, because our Centos 7 apache servers have no problem accessing the file systems or executing ajax scripts.