I am new to WAMP and I have just installed it today.
The setup went well and localhost seems to work, but when I try to access phpMyAdmin I get this error:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
Why do I get this permission access error with phpMyAdmin?
I am using Windows 7.
If you are on Windows 7 or 8 then Apache might be seeing the connections coming from "::1" which is the IPv6 equivalent of 127.0.0.1.
You can check this by looking in the Apache Access Log (reachable from the WAMP menu)
The ::1 at the start is the clients address. The 403 at the end is the Access Denied code.
The answers above will remove all restrictions and open phpmyadmin to all, but if you still want to restrict phpmyadmin to your machine only (generally a good idea) then under the line...
..add the following:
(edit: Added suggestion from Nukeface)
In my case, the problem was that the phpMyAdmin version was specified wrongly in the
phpmyadmin.conf
file. You may check that:Go to wamp/apps/phpmyadmin3.x.x: notice the file name - what version you are currently using?
Open file wamp/alias/phpmyadmin.conf:
Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all
Check the first line (directory "c:/wamp/apps/phpmyadmin3.x.x/") is the file name exactly the same as your actual file name.
Make sure the directory file name is absolutely correct.
Change the file content of
c:\wamp\alias\phpmyadmin.conf
to the following.Note: You should set the
Allow
Directive to allow from your local machine for security purposes. The directiveAllow from all
is insecure and should be limited to your local machine.Here my WAMP installation is in the
c:\wamp
folder. Change it according to your installation.Previously, it was like this:
Modern versions of Apache 2.2 and up will look for a IPv6 loopback instead of a IPv4 loopback (your localhost).
This will allow only the local machine to access local apps for Apache.
Restart your Apache server after making these changes.
So all of these answers are basically the same one. They only address one idea: it has to be DNS related. Well, that is not the only part of this it turns out. After many changes, I was getting nowhere reading the next "same answer" hoping that it would just go my way.
What did the trick for me was to adjust my versions of Apache. I think what the deal was, is that the one of the configuration files get a path off or that the install due to IIS may have been messed up
/
or/
or/etc
. And so forcing a version change readdresses everything from your firewall to bad configurations.In fact, when I switched back to Apache 2.4.2 it goes back to being a forbidden. And as soon as I go back to Apache 2.4.4 it comes back up. That rules out local network issues. I just wanted to point out that all of the answers here are the same and that I have been able to kill the forbidden by changing the Apache version.
replace localhost with 127.0.0.1 in your URL, worked for me.
I had the same problem. The hosts file is corrupted! there were:
The result is that
localhost
is not defined.Solution: edit the hosts file with admin rights and correct to only one entry: