phpmyadmin token mismatch for long time idle

2020-05-17 04:32发布

I installed phpMyAdmin 4.0.4.1 on my local develop enviroment, I set auth_type to config. Also I provide authentication requirements by this settings:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['password'] = 'somepassword';

But after a while that it is idle, if I click on any link of it , it shows me an error token mismatch, Is there any way that I increase its TTL? or make it alive permanently?

enter image description here

Above picture shows error.

10条回答
不美不萌又怎样
2楼-- · 2020-05-17 04:55

Clearing your browser cache then it will work.

查看更多
唯我独甜
3楼-- · 2020-05-17 05:00

in file libraries/common.inc.php

line 1076
delete this part

 /*
 * There is no point in even attempting to process
 * an ajax request if there is a token mismatch
 */
 if (isset($response) && $response->isAjax() && $token_mismatch) {
    $response->isSuccess(false);
    $response->addJSON(
        'message',
        PMA_Message::error(__('Error: Token mismatch'))
    );
    exit;
}
查看更多
够拽才男人
4楼-- · 2020-05-17 05:00

Try using another browser ex IE if it works then remove suspected chrome extensions . Forr me pageXray was the problem.

查看更多
冷血范
5楼-- · 2020-05-17 05:02

For me this seemed to be caused by my root partition being full up, and I guess this error was triggered by php being unable to write to the session directory.

查看更多
登录 后发表回答