Too Many Post Data variables?

♀尐吖头ヾ 提交于 2019-11-29 17:01:29

I had a similar problem today. I had a form with 250+ rows and 5 variables per row, but the $_POST variable appeared to be truncated. In my case, it stopped after 1000 elements.

There is a PHP setting called max_input_vars that defaults to 1000. This setting sets an upper limit on how many variables it will pull into your PHP script. You may need to increase this value on your server settings to make your page work. There are some security implications that I don't fully understand with increasing this value that could enable a denial of service attack.

Since you are developing a Wordpress plugin, you may need to see if there are ways to change your form to reduce the number of variables you send, because you probably can't alter server configurations for people using your plugin.

Read more about the setting here: http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!