MySQL PhpMyAdmin 错误:令牌不匹配

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18358867/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 18:35:37  来源:igfitidea点击:

PhpMyAdmin Error: Mismatch Token

mysqlphpmyadminxampp

提问by Lucas JD

I've just recently been getting an error in my local installation on installed on apache on xampp. I'm running v4.0.5 of phpmyadmin. The error description is Error: Mismatch Token.

我最近在 xampp 上的 apache 上安装本地安装时遇到错误。我正在运行 phpmyadmin 的 v4.0.5。错误描述为错误:不匹配令牌。

Has anyone else experienced this an found a fix for it?

有没有其他人经历过这种情况并找到了解决方法?

回答by Conrad Lotz

You can try the following

您可以尝试以下操作

Find the XAMPP php.ini file and uncomment by removing the semi-colon:

找到 XAMPP php.ini 文件并通过删除分号取消注释:

session.save_path ="/tmp"

Then restart apache.

然后重启apache。

回答by kbhatta

Did you change anything in your apache server config files?

您是否更改了 apache 服务器配置文件中的任何内容?

if not,

如果不,

open browser, clear all history(ctrl+shift+del), and restart browser, go to phpmyadmin page.

打开浏览器,清除所有历史记录(ctrl+shift+del),然后重启浏览器,进入phpmyadmin页面。

it works for me :)

这个对我有用 :)

回答by yab86

Had the same problem. Solved it by changing following:

有同样的问题。通过更改以下内容解决了它:

$token_mismatch = true;

to

$token_mismatch = false;

in \xampp\phpMyAdmin\libraries\common.inc.php

\xampp\phpMyAdmin\libraries\common.inc.php

回答by Roshan Padole

I too came across a same issue. I tried many ways, like clearing cache, managing more space for my /tmp directory. But at last I solved this issue by removing the unwanted files from my server & managing free space on my server.

我也遇到了同样的问题。我尝试了很多方法,比如清除缓存、为我的 /tmp 目录管理更多空间。但最后我通过从我的服务器中删除不需要的文件并管理我的服务器上的可用空间来解决这个问题。

You can check here how I have done that. Error: Token Mismatch PhpMyAdmin Cpanel Solved

你可以在这里查看我是如何做到的。错误:令牌不匹配 PhpMyAdmin Cpanel 已解决

回答by nuke_infer

To resolve, try the following:

要解决,请尝试以下操作:

Delete cookies from 127.0.0.1.
Try to reproduce the problem in a different browser.

Does this help?

这有帮助吗?

回答by Onnonymous

This error may appear if your website has a Content-Security-Policy header that is too restrictive.

如果您的网站具有过于严格的 Content-Security-Policy 标头,则可能会出现此错误。

This header caused the "Mismatch token" error for me:

此标头对我造成了“不匹配令牌”错误:

content-security-policy: default-src 'self'; style-src 'self' 'unsafe-inline';

By adding script-src 'self' 'unsafe-inline';the error disappeared:

通过添加script-src 'self' 'unsafe-inline';错误消失了:

content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';

More info: https://content-security-policy.com/

更多信息:https: //content-security-policy.com/

回答by PAVITRA

I had an extra "/" in my browser path. Removed that an it worked for me...

我的浏览器路径中有一个额外的“/”。删除了它对我有用...

回答by sillu

Changing session.save_path in php.ini to "/tmp" worked for me, RedHat6.

将 php.ini 中的 session.save_path 更改为“/tmp”对我有用,RedHat6。