Phpmyadmin access denied after changing to older v

2019-08-27 21:13发布

问题:

Does anyone know why this is?

I have read various things about changing the httpd.conf file but

  1. the information varies and is conflicting
  2. what is said to be in the file is not in the same format and there are two versions of what is meant to be there i.e. <Directory /> </Directory> and <Directory something else> </Directory>

The original PHP 5.4.3/Apache 2.4.2 is working fine but I can't see enough similar points of reference to be able to copy the httpd.conf settings over into the file for Apache 2.2.2 (which I am using with PHP 5.3.1.

Lines 160-166:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

Lines 305-310:

<Directory "cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

Or is it something completely different?

回答1:

You will need to add the following lines to httpd.conf:

# This tells Apache where to look for phpmyadmin
Alias /phpmyadmin C:/wamp/apps/phpmyadmin3.5.1

# This gives permission to serve the directory
<Directory C:/wamp/apps/phpmyadmin3.5.1>
  Options None
  AllowOverride None
  # This allows eveyone to access phpmyadmin, which you may not want
  Order Allow,Deny
  Allow from all
</Directory>

Once you have made these modifications and restarted Apache, it should work.

I suspect the first line may already be present, because you are getting a 403 and not a 404.