Sunday, June 7, 2009

How to fix You don't have permission to access /phpmyadmin/ on this server Wamp

You don't have permission to access /phpmyadmin/ on this server (WAMP)
This is the message I got when I tried to access phpmyadmin after reinstalling WAMP server to a newer version. After some searching I was able to find the problem.

Reason:

When you uninstall your previous WAMP server there will be still few files that will be left not deleted and will not be replaced by the new install. One such file is the phpmyadmin.conf file that is under C:\wamp\alias folder. This file holds the actual path to the phpmyadmin folder inside WAMP.
If the new WAMP server has a new phpmyadmin version this phpmyadmin.conf will still point to the old folder which is not existing inside WAMP.

Solution:

goto C:\wamp\alias\ and edit the phpmyadmin.conf file using notepad


Alias /phpmyadmin "c:/wamp/apps/phpmyadmin2.11.6/"

# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#

<Directory "c:/wamp/apps/phpmyadmin2.11.6/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>



I just edited the c:/wamp/apps/phpmyadmin2.11.6/ with c:/wamp/apps/phpmyadmin3.1.3.1/
To find your new phpmyadmin folder goto C:\wamp\apps\


Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.1.3.1/"

# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#

<Directory "c:/wamp/apps/phpmyadmin3.1.3.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>



Now restart the WAMP server and try to access phpmyadmin

20 comments:

  1. Thanks mate. I had the same problem but different. I installed wamp from my windows XP, then reinstalled on my windows 7 overwriting the folders. Under XP, the drive was c:\ but under 7 the drive was I:\ so each time I change OS, phpMyAdmin won't run. I didn't know what was wrong till I read your post. The solution was simple. To edit wamp\alias'phpmyadmin.conf by replacing the C:\ with the I:\ drive each time I switch OS

    ReplyDelete
  2. I encountered the same problem, I mean the forbidden thingy.. HEre's the thing, I have a php file named "destroySession.php".. in this file alone, I am trying to destroy session variable, however, everytime I call this, it indicates in the browser that it is forbidden.. I tried everything up until I changed the file name... then it worked.. I dunno, but perhaps it could also detect potentially harmful terms like "destroy" and the likes...

    ReplyDelete
  3. hey! I had the same problem
    but i'm not even able to save any changes to the conf file. can you tell me what to do for that?

    ReplyDelete
  4. It works!! Thanks...

    ReplyDelete
  5. it wont work for me :S

    ReplyDelete
  6. keep this up well- done

    ReplyDelete
  7. i am try to phpmyadmin open to this error raise You don't have permission to access /phpmyadmin/ on this server.

    ReplyDelete
  8. i am using windows 7 i am try to open phpmyadmin data base but not open please help me


    open to this msg display Forbidden

    You don't have permission to access /phpmyadmin/ on this server.

    ReplyDelete
  9. I have installed phpmyadmin 3.5.1 first time in my computer and yet i m getting this eeeerrrroooorrrrr... plsss help me...

    ReplyDelete
  10. i have installed phpmyadmin 3.5.1 first time in my computer though i am getting this Forbidden error.. plsss help me.

    ReplyDelete
  11. too much thanks dear for your kind help

    ReplyDelete
  12. I almost ran mad trying to figure this out....this for pointing out. there's one simple way to overcome this issue. when you uninstall wamp make sure to delete the c:/wamp folder before reinstalling....it solves all your headaches

    ReplyDelete
  13. i have same problem in windows 8 64 bit

    ReplyDelete
    Replies
    1. Hello, I had a similar issue with my windows 8 64bit machine, the PhPmyadmin gives the error "Forbidden: You don't have permission to access /phpmyadmin/ on this server (WAMP)", after going through the posts here, all I did was to uninstall the wamp server, delete the existing wamp folder in c:/wamp which also contains the c:/wamp/alias/phpmyadmin.conf file, the new installation points back to it so you have to delete the file @ c:/wamp/alias/phpmyadmin.conf before installing a new copy of wampserver i.e. after uninstalling the existing(non functional) wampserver, the issue should be resolved. NB: this is just a metshod that worked for me, it could be because of many other reasons on your computer, try this anyways. Thanks @harunaadoga

      Delete
  14. I did read to change

    Allow from 127.0.0.1

    to

    Allow all

    That worked for me, but I'm afraid it might open the admin to outside IP's and be a security risk

    ReplyDelete
  15. Hello, I had a similar issue with my windows 8 64bit machine, the PhPmyadmin gives the error "Forbidden: You don't have permission to access /phpmyadmin/ on this server (WAMP)", after going through the posts here, all I did was to uninstall the wamp server, delete the existing wamp folder in c:/wamp which also contains the c:/wamp/alias/phpmyadmin.conf file, the new installation points back to it so you have to delete the file @ c:/wamp/alias/phpmyadmin.conf before installing a new copy of wampserver i.e. after uninstalling the existing(non functional) wampserver, the issue should be resolved. NB: this is just a metshod that worked for me, it could be because of many other reasons on your computer, try this anyways. Thanks @harunaadoga

    ReplyDelete
  16. Brilliant.... thanks alot bro!!!

    ReplyDelete
  17. Thanks a lot! God bless you.

    ReplyDelete