To design a Worpress site, the developers download the WAMP file. When you do that, you may end up with the error warning “you don’t have permission to access /phpmyadmin/ on this server”. The error always seems frustrating, though it is not as complex as you may think. with the right approach, cracking a code is no big deal.
We provide you with the solutions to help you solve the error in an efficient way. Let’s check out how the error shows up
How the error occurs
When you are trying to work or write on php, you end up with the error warning. Check out the code that returns the error
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>
Soon after the code, you get the error message
Forbidden
You don't have permission to access `phpmyadmin` on this server
Wondering how to fix it? Take a look at how to fix it
How To Solve the Error “you don’t have permission to access /phpmyadmin/ on this server”
The error pops up when you have an IP address issue. Check out the effective solutions to fix the issue
Solution 1 – Edit phpMyAdmin.conf
If you are using CentOS 7, then you need to edit the configuration. To edit the phpMyAdmin.conf, edit the file /etc/httpd/conf.d/phpMyAdmin.conf like this:
Also, you need to replace <Directory> … </Directory>
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
It resolves the error you are getting.
Solution 2 – Replace the command
Replacing two commands can fix the error. Check it out
Replace the command
Allow from 127.0.0.1
Into the following command
Allow from 10.1.3.53
Replace the second command
Require ip 127.0.0.1
Into the below command
Require ip 10.1.3.53
Once done, you need to close Restart Apache httpd server after saving, then restart.
Conclusion
We shed light on the solutions to handle the exception “you don’t have permission to access /phpmyadmin/ on this server”. You can simply solve the error by following the above-mentioned solutions.
I hope you find it useful! I wish you luck and happy error solving!