phpmyadmin - Xampp 上的 phpmyadmin 突然给出 403
问题描述
我多年来一直在使用 Xampp,但突然间我无法再访问 phpmyadmin。
我明白了
Forbidden
You don't have permission to access this resource.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Mijn xampp\phpMyAdmin\config.inc.php:
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/*
* End of servers configuration
*/
?>
以及我的 httpd-xampp.conf 的相关部分:
<IfModule alias_module>
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
SSLRequireSSL
</Directory>
</IfModule>
知道出了什么问题吗?
解决方案
它的配置方式只允许来自本地主机(运行 xampp 的同一台计算机),因此如果您从局域网客户端尝试,您应该像这样在 alis 配置中添加一行Require ip 192.168.1.0/24
(根据局域网网络进行相应编辑)。
另外,据说在尝试检查错误页面时遇到了 403 错误(权限被拒绝)。因此,显示 403 可能不是真正的错误,而是最后一个错误。
您应该查看 apache 日志以验证第一个错误
推荐阅读
- scala - 解释递归求和法
- python - BingAds API:DownloadCampaignsByAccountIds:“无效的客户数据”
- python-3.x - 如何使用 discord.py 将服务器和用户 ID 存储在 json 文件中
- javascript - 将 URL 参数传递给框架
- javascript - 如何在 Jquery 中创建两个匹配函数
- c - 使用 SSE3 水平添加
- javascript - 如何使用javascript检测文本框中这些字符之间的字符和单词?
- javascript - 如何将网络摄像头视频发送到 rtmp
- java - WebService Java 和 glashfish 中的错误,发生在 List <> 中,我无法使用它
- c# - WinForms自定义控件,DoubleBuffered,读取那个缓冲区?