0

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

Joskaa
  • 151
  • 1
  • 2
  • 9

1 Answers1

1

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

Eslam Sameh Ahmed
  • 3,792
  • 2
  • 24
  • 40