XAMPP Access Forbidden

Zac Cotterell picture Zac Cotterell · Apr 26, 2018 · Viewed 11.8k times · Source

I have just downloaded the latest version of XAMPP with PHP version 7.2.4. I have made a very simple PHP validation for a HTML form and when I press submit it comes up with the following:

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 localhost Apache/2.4.33 (Win32) OpenSSL/1.1.0g PHP/7.2.4

I'd don't know what the problem is as I have tried changing Require none to Require all granted.

Please Help!

Answer

andread picture andread · Jun 14, 2018

I have experienced this problem and found out that localhost link is not configured in httpd_vhosts.conf. So I added this line at the bottom part of httpd_vhosts.conf

<VirtualHost *:80>
    DocumentRoot "E:/xampp/htdocs"
    ServerName localhost
</VirtualHost>