phpmyadmin免登陆_PHP

WBOY
Release: 2016-05-30 08:47:37
Original
941 people have browsed it

第一步:

打开 phpmyadmin/libraries/plugins/auth/AuthenticationCookie.class.php

找到 authCheck 和 authSetUser 两个函数的定义,在函数体最前面直接加个 return true; 就是让这两个函数无论何时都只返回 true。

经过第一步后,你每次打开phpmyadmin 都可以不用登陆自动进入 dashboard 了,但是仍然会在你长时间不操作之后提示你 token 已过期,需要重新刷新一下页面。

所以第二步就是解决这个问题的。

第二步:

打开 phpmyadmin/libraries/common.inc.php

找到下面这段代码:

$token_mismatch = true;
if (PMA_isValid($_REQUEST['token'])) {
    $token_mismatch = ($_SESSION[' PMA_token '] != $_REQUEST['token']);
}
Copy after login

在它后面插入一句:

$token_mismatch = false;
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!