解决phpmyadmin加载慢问题
本帖最后由 新手学习52破解 于 2022-3-31 09:51 编辑问题出自phpmyadmin请求远程地址获取版本信息过慢
地址为:https://www.phpmyadmin.net/home_page/version.json
知道了原因就好解决了,修改代码如下:
版本:phpmyadmin4.9.7,打开文件【phpmyadmin4.9.7/version_check.php】,找到41行
版本:phpmyadmin5.1.1,打开文件【phpmyadmin5.1.1/libraries/classes/VersionInformation.php】,找到51行
注释下列三行:
// $file = 'https://www.phpmyadmin.net/home_page/version.json';
// $httpRequest = new HttpRequest();
// $response = $httpRequest->create($file, 'GET');
添加代码:
$response=[
"date"=> "2022-02-11", "version"=> "5.1.3",
"releases"=> [
[
"date"=> "2022-02-11",
"php_versions"=> ">=7.1,<8.1",
"version"=> "5.1.3",
"mysql_versions"=> ">=5.5"
],
[
"date"=> "2022-02-11",
"php_versions"=> ">=5.5,<8.0",
"version"=> "4.9.10",
"mysql_versions"=> ">=5.5"
]
]
];
$response=json_encode($response);
最终修改如下:
} else {
$save = true;
// $file = 'https://www.phpmyadmin.net/home_page/version.json';
// $httpRequest = new HttpRequest();
// $response = $httpRequest->create($file, 'GET');
$response=[
"date"=> "2022-02-11", "version"=> "5.1.3",
"releases"=> [
[
"date"=> "2022-02-11",
"php_versions"=> ">=7.1,<8.1",
"version"=> "5.1.3",
"mysql_versions"=> ">=5.5"
],
[
"date"=> "2022-02-11",
"php_versions"=> ">=5.5,<8.0",
"version"=> "4.9.10",
"mysql_versions"=> ">=5.5"
]
]
];
$response=json_encode($response);
}
$response = $response ? $response : '{}';
好家伙,你这还直接去掉了自动更新。{:1_927:}
页:
[1]