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
Incorrect format parameter
提问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.sql
format. From this link, I downloaded
php_oauth-1.2.3-5.6-ts-vc11-x86.zip
and copied thephp_oauth.dll
toc://xampp/php/ext/
and then inphp.ini
, I mentionedextension=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.dll
到c://xampp/php/ext/
,然后在php.ini
,我提到extension=php_oauth.dll
。在此之后,我通过 Xampp 运行了 Apache 服务器和 Mysql。然后尝试通过CLI导入sql备份文件如下:
mysql -u root < localhost.sql
我在命令提示符中遇到了一些错误。(我会尽快更新)
后来当我访问时
localhost/phpmyadmin
,我看到了这个页面:
采纳答案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:
在我的情况下,这有效:
- logout
- clear url (remove all after
?
, wspeciallytoken=blablabla
must be removed) - remove all cookies
- refresh
- login
- 登出
- 清除网址(删除所有之后
?
,特别是token=blablabla
必须删除) - 删除所有 cookie
- 刷新
- 登录
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_size
must be larger than upload_max_filesize
to 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:
解决方案:
- Navigate to
xampp\php\php.ini
- Find
upload_max_filesize
and increase it to desired upload side (e.g.upload_max_filesize=128M
) and save - Restart
xampp
- 导航
xampp\php\php.ini
- 查找
upload_max_filesize
并将其增加到所需的上传端(例如upload_max_filesize=128M
)并保存 - 重新开始
xampp
回答by Baseer Ebadi
The problem is with the Post Maximum size, open the PHP.ini
file and find the
post_max_size=8M
and 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_size
parameter from 8M
up to 128M
,
1. PHP.ini
-> 将post_max_size
参数从8M
up 增加到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 charset
to match that of the dumpfile. Works fine without any installs/re-installs.
这允许我更改connection charset
以匹配转储文件。无需任何安装/重新安装即可正常工作。
回答by veera
- set this database and ini file
- 设置这个数据库和ini文件
SET GLOBAL max_allowed_packet=1073741824; max_allowed_packet = 64M
设置全局 max_allowed_packet=1073741824;max_allowed_packet = 64M
then: use CLI (cmd) goto ->xamp->mysql->bin copy the path n set in Cmd
use below command to dumb db mysql.exe -u root -p db_name< "C:\Users\path\file.sql"
然后:使用 CLI (cmd) goto ->xamp->mysql->bin 复制 Cmd 中设置的路径 n
使用下面的命令使 db mysql.exe -u root -p db_name< "C:\Users\path\file.sql"