编程语言
首页 > 编程语言> > php – POST数据过大.减少数据或增加“post_max_size”

php – POST数据过大.减少数据或增加“post_max_size”

作者:互联网

我正在尝试通过Adminer上传一个gzip压缩的Mysql备份(71,2mb),它会抛出这个错误:

Too big POST data. Reduce the data or increase the “post_max_size” configuration directive.

即使我的post_max_size和其他php.ini设置是这样的:

post_max_size = 1024M
upload_max_filesize = 1024M

为什么我一直收到这个错误?

解决方法:

不要只检查php.ini中的值,因为它们可以被.htaccess文件或PHP代码覆盖.运行phpinfo()并比较左侧和右侧的值.右栏.右列中的值是实际使用的值.

同时考虑documentation的注释:

Sets max size of post data allowed. This setting also affects file
upload. To upload large files, this value must be larger than
upload_max_filesize. If memory limit is enabled by your configure
script, memory_limit also affects file uploading. Generally speaking,
memory_limit should be larger than post_max_size.

所以,您可能还需要更改memory_limit:

memory_limit > post_max_size > upload_max_filesize

标签:php,mysql,adminer
来源: https://codeday.me/bug/20190831/1776831.html