phpmyadmin token mismatch for long time idle
Solution 1
I solve this annoying problem by following instructions below:
- open
/etc/php5/apache2/php.ini
- find
;session.save_path = "/tmp"
, this line may look also like this;session.save_path = "/var/lib/php5"
- remove first semicolon from this line
- 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.
Solution 2
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;
}
Solution 3
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.
Solution 4
I had to turn my cookies on in my browser and it worked for me. (Using MAMP on OSX)
Solution 5
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.
Arash Mousavi
Updated on March 18, 2021Comments
-
Arash Mousavi about 3 years
I installed
phpMyAdmin 4.0.4.1
on my local develop enviroment, I setauth_type
toconfig
. 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?Above picture shows error.