简体   繁体   中英

Access forbidden in XAMPP

i referred the question below link for the 403 error. I tried all the solutions but none worked for me.

Xampp Access Forbidden php

I made a program to display image on a popup window when a condition is achieved. But, when I run the code, the popup window appears with the error message:

Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

But in the link bar, the name of the image is produced.

I tried changing the permissions for the folder of my project, but still I get the error.

the httpd vhosts config:

##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "B:/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>

##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "B:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>

 <Directory "B:/xampp/htdocs/PROJECT">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Allow from all
    Require all granted
 </Directory>

Can someone help me with this problem.

Thank you

You can follow this step by step guide video about setup PHP environment using XAMPP.

You can notice at time 8:14 the vhosts configuration is different than yours. You can download the configuration from the video description

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM