Reputation: 17
I am working on localhost xammp as I installed xamp and wordpress successfully. Now when I run the php code and provide the path in the Chrome browser, an error message appears that you do not have the permission to access...
Forbidden You don't have permission to access this resource.
Apache/2.4.46 (Win64) OpenSSL/1.1.1g PHP/7.2.34 Server at localhost Port 80
Upvotes: 0
Views: 22620
Reputation: 24
You'll have .htaccess file inside your htdocs folder, just delete .htaccess folder and it will resolved this error, I just done with mine.
Upvotes: -1
Reputation: 1
This could happen due to various reasons in various circumstances. I was working on a Laravel project and this error happened to me as well. For me, it was a wrong ajax URL for fetching the data. I used blade syntax and forgot to surround it with double curly brackets and instead enclosed it with a single one. So, please make sure that such errors don't exist within your application.
Upvotes: 0
Reputation: 1
You may have to point to your project in the apache httpd folder. Here is an example where I created a project for a Udemy course: DocumentRoot "C:/xampp/htdocs/Complete HTML and CSS Learn Web Development with HTML and CSS/public" <Directory "C:/xampp/htdocs/Complete HTML and CSS Learn Web Development with HTML and CSS/public">
It was originally DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs">
Restart your apache server and go to localhost and if you have an index file in the folder it will be rendered. Otherwise put the name of the file in the browser search box like this: localhost/divspan.html as in my case. Make sure you save a copy of the httpd file before modifying it so in case there is confusion you cab go back, a sort of version control mechanism for your httpd file.
Upvotes: 0
Reputation: 26
I faced the same problem and this is what worked for me
Upvotes: 1