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:35

I solve this annoying problem by following instructions below:

  1. open /etc/php5/apache2/php.ini
  2. find ;session.save_path = "/tmp", this line may look also like this ;session.save_path = "/var/lib/php5"
  3. remove first semicolon from this line
  4. restart apache by executing sudo service apache2 restart

FYI: I work under Ubuntu 12.04 with apache2, php5, phpMyAdmin 4.0.5 so for different systems and servers file path may be a little different.

In case of any troubles check if directory from step 2. is writable for server.

Good luck.

查看更多
仙女界的扛把子
3楼-- · 2020-05-17 04:35

ISSUE RESOLVED - I just cleared the browsing history and data for last 7 days. It solved the problem for me. Try it.

查看更多
放我归山
4楼-- · 2020-05-17 04:44

After doing all that was recommended here and in other places with no success, I found out that my /tmp was full.

To check it, just run from command line: df

It reports file system disk space usage.

查看更多
smile是对你的礼貌
5楼-- · 2020-05-17 04:53

I had to turn my cookies on in my browser and it worked for me. (Using MAMP on OSX)

查看更多
祖国的老花朵
6楼-- · 2020-05-17 04:53

In my case I had to remove some files to make some space in this directory (\tmp) and the error was gone for now.

查看更多
别忘想泡老子
7楼-- · 2020-05-17 04:53

To stop this issue, delete the "tmp" folder and make a new one called "tmp" or just clear the content.

查看更多
登录 后发表回答