Phpmyadmin access denied after changing to older versions of PHP/Apache on Wampserver

自古美人都是妖i 提交于 2019-12-25 14:26:39

问题


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.



来源:https://stackoverflow.com/questions/11688699/phpmyadmin-access-denied-after-changing-to-older-versions-of-php-apache-on-wamps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!