Debug School

rakesh kumar
rakesh kumar

Posted on

How to solve Xampp Access Forbidden phpmyadmin

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

Image description

Add this lines to httpd-vhosts.conf file:

<Directory "c:/<path-to-projects>/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
Enter fullscreen mode Exit fullscreen mode


after changes please test it in incognito because you redirected by cache

Open terminal press shortcut key Ctrl+Alt+T Goto

$ cd /opt/lampp/htdocs/

and change folder read write and execute permission by using chmod command

e.g folder name is practice and path of folder /opt/lampp/htdocs/practice

Type command

$ sudo chmod 777 -R Practice
Enter fullscreen mode Exit fullscreen mode


The way I resolved this was setup error logs correctly, first

<VirtualHost *:80>
    DocumentRoot "D:/websites/test/"
    ErrorLog "D:/websites/test/logs/error.log"
    CustomLog "D:/websites/test/logs/access.log" common
    <Directory D:/websites/test/>  
        AllowOverride none
        Require all granted  
Enter fullscreen mode Exit fullscreen mode

Another Possibility

The "Access forbidden!" error when trying to access phpMyAdmin can occur for various reasons. Here are some steps to troubleshoot and resolve the issue:

Check if phpMyAdmin is installed: Ensure that phpMyAdmin is installed on your server. If it's not installed, you need to install it first. You can typically install phpMyAdmin using a package manager like apt for Debian/Ubuntu or yum for CentOS.

Check Configuration Files:

Verify the configuration of phpMyAdmin. The main configuration file is typically located in /etc/phpmyadmin/ on Linux systems.
Check if the Allow directive is properly configured to allow access from your IP address.
Check Web Server Configuration:

Make sure that your web server (e.g., Apache or Nginx) is correctly configured to serve phpMyAdmin.
Check your virtual host or server block configuration to ensure that phpMyAdmin is accessible.
Check .htaccess Files:

Look for .htaccess files in your web server directory and parent directories. These files can contain rules that restrict access.
Ensure that there are no deny rules in these .htaccess files that may be blocking access.
Check Firewall Rules:

If you have a firewall (e.g., UFW on Ubuntu), ensure that it is not blocking access to the phpMyAdmin port (usually port 80 or 443).
Verify that your server's security group (if hosted on a cloud service like AWS) is allowing traffic on the required ports.
Check IP Whitelisting: Some installations of phpMyAdmin may have IP whitelisting configured. Ensure that your IP address is whitelisted if this feature is enabled.

Check Error Logs:

Examine your web server error logs for any specific error messages related to phpMyAdmin access issues.
On Apache, you can typically find error logs in /var/log/apache2/error.log.
Check Permissions:

Make sure that the phpMyAdmin directory and files have the correct permissions so that the web server user can read them.
You can use the chown and chmod commands to adjust permissions if necessary.
Check DNS Configuration: Ensure that the domain name resolves to the correct IP address. If DNS is misconfigured, it might lead to access issues.

Browser Cache: Sometimes, the browser cache can cause issues. Try accessing phpMyAdmin in an incognito or private browsing window to rule out caching problems.

Restart Services: After making changes to your server configuration, restart your web server to apply the changes.

Security Plugins: If you have security plugins or tools installed on your server, check if they are blocking access to phpMyAdmin.

Consult with Hosting Provider: If your website is hosted with a web hosting provider, reach out to their support for assistance. They may have specific configurations or security settings in place.

After this error are being logged into "D:/websites/test/logs/" make sure to create logs folder yourself. The exact error that was recorded in error log was

Top comments (0)