在 MAMP 上手动升级 php 版本后 phpmyadmin 无法工作

问题描述 投票:0回答:1

我尝试了许多我能找到的解决方案,但似乎没有任何效果。

我刚刚将 php 版本 8.1.5 添加到 MAMP。我这样做的方法是将 php 从我的 mac 复制到 MAMP 的 php 文件夹中,并修改模块以使 apache 能够工作。现在我可以从 MAMP 选择 PHP 8.1.5,启动服务器并正常使用我的本地应用程序。

SQL 连接也工作正常。

我遇到的问题是,当我使用 PHP 8.1.5 并尝试访问 PHP 我的管理员时,我收到以下错误:

Welcome to phpMyAdmin

Error

Cannot connect: invalid settings.

mysqli::real_connect(): (HY000/2002): No such file or directory

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

我已将配置文件更改为推荐的,但仍然遇到相同的错误。

注意:切换回 php 8.0.8 可以正常工作,因此看起来不是配置问题,而是 phpmyadmin 和我添加的最新 php 版本的兼容性问题。

我刚刚安装了最新的 MAMP,所以我不确定还能尝试什么。

phpmyadmin mamp
1个回答
0
投票

你有没有深入了解这个问题,我也做了同样的事情,并且在 PHP 8.2.3 上遇到了完全相同的问题。 PHP 8 运行良好。 PHPMyAdmin 或任何 WordPress 安装都无法连接。一切都在 localhost 而不是 127.0.0.1 上运行,我不想在所有应用程序中更改这一点,特别是因为我有时需要回退到旧版本的 PHP 来测试与其他服务器软件的兼容性。

© www.soinside.com 2019 - 2024. All rights reserved.