Xampp is installed on my local windows machine.
I downloaded WordPress 4.5.2, unzipped it and put the contents in a folder called wptest which is in htdocs.
Xammp has php 7.0.6
The error I am getting is:
Access forbidden!
You don't have permission to access the requested directory. There is either
no index document or the directory is read-protected.
Error 403
If I type localhost into the browser I am taken to the localhost/dashboard
and if I type in localhost/wptest I get the access denied error.
When I first copied the wp files into the wptest folder I took the following steps:
Created a DB called wptest (same as the folder with the wp files in).
Renamed wp-config-sample.php file to wp-config.php.
Inside wp-config.php I Replaced “database_name_here” with wptest,
Replaced “username_here” with “root” and Left the “password_here” blank.
I have tried several suggestions from forum posts regarding the access denied error but am getting nowhere.
As I have little experience with phpMyAdmin & XAMMP it may be a simple permissions setting I have missed.
Did you try with a older version on php?
I have the 5.6.3 version and it works fine.
Related
I have been searching for hours now and I cant find a solution. I have tried much to many things to even start listing the things. So please any assistance would be appreciated.
I have changed the htdocs folder location in httpd.conf because I have all my files sync to cloud storage. This works perfectly on my windows machine but on linux not so much. Every thing runs perfectly but when I try to access my htdocs folder (new location) I get a message:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.48 (Unix) OpenSSL/1.1.1k PHP/8.0.10 mod_perl/2.0.11 Perl/v5.32.1
But When I change the location back to the normal location it works perfectly.
I have already gave full access to the folder.
Think of a directory structure as a series of security doors:
/var
/www
/htdocs
If you give someone a key to htdocs (i.e. set the permissions to give a user access) then they can open that door… but only if they can get to it.
If you don't also give them keys to www and var then they can't get into htdocs.
I have a problem with my XAMPP server after uninstalling an old version for a new one. I have a problem with executing PHP codes because when I put "localhost/file.php" it says "Object not found" or put the PHP document despite having the Apache server on.
When I access the XAMPP directory from localhost, it's completely empty despite I stored the site in the htdocs folder. And if you ask, the xampp folder's location is C:/xampp/. And I did put an .htaccess file in my file's directory.
Here's a screenshot:
xampp -> apache -> config -> apache(httpd.conf) and search DocumentRoot and Directory.
see there what link is set.
Giving localhost in the browser address bar refers to htdocs folder.
As we can see the address as localhost/xampp i.e you are refering to htdocs/xampp
if you have stored your file in htdocs root folder, then give the address as localhost
I am using MAMP and MAMP Pro and I am trying to run some php in a new folder. I store the files in the root directory Applications > MAMP > htdocs . When I create a new folder to store a .php folder I get an error message saying
"Forbidden
You don't have permission to access /phptutorial/ on this server."
The folder /phptutorial/ is one I am trying to create I don't understand what seems to be be problem on MAMP since I own and have full rights of the file.
I have installed xampp and configured the browser to listen to port 8000.I saved the file using a .php extension selecting the all files option while saving and saved it in the htdocs folder.Still when I use localhost\mypage.php it shows the resource not found error.
Copied the code into notepad and placed the file in htdocs folder and opened it in netbeans and it was working fine.
I am doing PHP development using Linux OS ,Lampp Apache server.I changed the default root folder htdocs to another folder PHP on my desktop. When I create a hello.php file in the folder ,I can see it in browser and works well.
But I have another folder inside this root folder called 'front_end'.When I try to see it in browser using http://localhost/front_end ,i get access forbidden.
Firebug shows 'Access forbidden'
How can I get access to this folder using localhost?
Another user asked a similar question on stackoverflow ,but it didn't help.
Ubuntu/Apache2/ Forbidden/Permission error
Assuming you have followed the advice regarding the file permissions.
Have you got an index.php file in the front_end directory?
If not that may be why you get 'Access forbidden'. See Apache 403 Forbidden Error and Solution Try accessing the spesific php file in the directory e.g. /front_end/test.php
Permissions on the folder
Check the permissions of the folder.
Use sudo to create the folders.