php 格式参数不正确

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29431518/
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-26 00:24:17  来源:igfitidea点击:

Incorrect format parameter

phpmysqlapachephpmyadminxampp

提问by Mr_Green

Currently, when I visit localhost/phpmyadmin, I am seeing the following error:

目前,当我访问时localhost/phpmyadmin,我看到以下错误:

ERROR: Token Mismatch (In tooltip)

Incorrect format parameter

错误:令牌不匹配(在工具提示中

格式参数不正确

I will explain the changes I did step by step:

我将逐步解释我所做的更改:

  • I had xampp of version 1.7.1 installed.
  • To upgrade it to latest, I renamed Xampp folder in c://to "xampp_1" and took the group database backup in .sqlformat.
  • From this link, I downloaded php_oauth-1.2.3-5.6-ts-vc11-x86.zipand copied the php_oauth.dllto c://xampp/php/ext/and then in php.ini, I mentioned extension=php_oauth.dll.

  • After this, I ran Apache server and Mysql through Xampp. then tried to import the sql backup file through CLI as follows:

    mysql -u root < localhost.sql
    
  • I got some error in command prompt. (I will update this soon)

  • Then later when I visited localhost/phpmyadmin, I am seeing this page:

  • 我安装了 1.7.1 版的 xampp。
  • 为了将其升级到最新版本,我将 Xampp 文件夹重命名c://为“xampp_1”并以.sql格式进行组数据库备份。
  • 从这个链接,我下载php_oauth-1.2.3-5.6-ts-vc11-x86.zip并复制php_oauth.dllc://xampp/php/ext/,然后在php.ini,我提到extension=php_oauth.dll

  • 在此之后,我通过 Xampp 运行了 Apache 服务器和 Mysql。然后尝试通过CLI导入sql备份文件如下:

    mysql -u root < localhost.sql
    
  • 我在命令提示符中遇到了一些错误。(我会尽快更新

  • 后来当我访问时localhost/phpmyadmin,我看到了这个页面:

enter image description here

在此处输入图片说明

采纳答案by Jared Clemence

Adding solution as a answer text so that the question drops from the Unanswered Questions list. Original answer is provided by the question author in a reply/comment on his original question text:

添加解决方案作为答案文本,以便问题从未回答的问题列表中删除。原始答案由问题作者在其原始问题文本的回复/评论中提供:

I uninstalled both 1.7.1 and 5.6.3 and then re-installed 5.6.3. That did the trick.

我卸载了 1.7.1 和 5.6.3,然后重新安装了 5.6.3。这就是诀窍。

回答by guest

In my case this worked:

在我的情况下,这有效:

  1. logout
  2. clear url (remove all after ?, wspecially token=blablablamust be removed)
  3. remove all cookies
  4. refresh
  5. login
  1. 登出
  2. 清除网址(删除所有之后?,特别是token=blablabla必须删除)
  3. 删除所有 cookie
  4. 刷新
  5. 登录

This can't fix the problem basically as the same error may appear in any time

这基本上不能解决问题,因为同样的错误可能随时出现

回答by Furkan ozturk

Find php.ini in the xampp

在 xampp 中找到 php.ini

  • 1- post_max_size: 128M(give a size for example 128)
  • 2- upload_max_filesize : 64M(for example 64)
  • 1- post_max_size: 128M(给出一个尺寸,例如 128)
  • 2- upload_max_filesize : 64M(例如 64)

post_max_sizemust be larger than upload_max_filesizeto fix the problem.

post_max_size必须大于upload_max_filesize解决问题。

回答by Vishish Kumar

Reason:You are getting this error because size of your filename.sql is greater than maximum upload limit. (By default you can import upto Max:2,048KiB)

原因:您收到此错误是因为您的 filename.sql 的大小大于最大上传限制。(默认情况下,您可以导入 upto Max:2,048KiB

Solution:

解决方案:

  1. Navigate to xampp\php\php.ini
  2. Find upload_max_filesizeand increase it to desired upload side (e.g. upload_max_filesize=128M) and save
  3. Restart xampp
  1. 导航 xampp\php\php.ini
  2. 查找upload_max_filesize并将其增加到所需的上传端(例如upload_max_filesize=128M)并保存
  3. 重新开始 xampp

回答by Baseer Ebadi

The problem is with the Post Maximum size, open the PHP.inifile and find the post_max_size=8Mand increase it up to post_max_size=128M,

问题出在 Post Maximum size 上,打开PHP.ini文件并找到 post_max_size=8M并将其增加到post_max_size=128M,

1.PHP.ini->increase the post_max_sizeparameter from 8Mup to 128M,

1. PHP.ini-> 将post_max_size参数从8Mup 增加到128M,

that's it.

就是这样。

回答by Rowland Mtetezi

I found a perfect solution in the following tool: BigDump: Staggered MySQL Dump Importer

我在以下工具中找到了一个完美的解决方案: BigDump: Staggered MySQL Dump Importer

which allowed me to change the connection charsetto match that of the dumpfile. Works fine without any installs/re-installs.

这允许我更改connection charset以匹配转储文件。无需任何安装/重新安装即可正常工作。

回答by veera

  1. set this database and ini file
  1. 设置这个数据库和ini文件

SET GLOBAL max_allowed_packet=1073741824; max_allowed_packet = 64M

设置全局 max_allowed_pa​​cket=1073741824;max_allowed_pa​​cket = 64M

  1. then: use CLI (cmd) goto ->xamp->mysql->bin copy the path n set in Cmd

  2. use below command to dumb db mysql.exe -u root -p db_name< "C:\Users\path\file.sql"

  1. 然后:使用 CLI (cmd) goto ->xamp->mysql->bin 复制 Cmd 中设置的路径 n

  2. 使用下面的命令使 db mysql.exe -u root -p db_name< "C:\Users\path\file.sql"