开发者

php loses form POST parameters

开发者 https://www.devze.com 2023-02-22 03:37 出处:网络
I have a form which sends data with the POST method, about 3000 array keys to be inserted in MySQL like this:

I have a form which sends data with the POST method, about 3000 array keys to be inserted in MySQL like this:

client_add[]=1
client_add[]=3
client_add[]=47
...

The problem is on my local开发者_如何学Pythonhost on the development server works just fine. On production I only get about 1000 rows, on the localhot it seems to get lost, we confronted the php.ini files and the development server has everything set to more memory than my localhost.

I've run out of ideas.


The size of the post body will be somewhere around 50kb, which is ok as long as the server and/or PHP doesn't enforce a limit. It seems like your production environment enforces such a limit. You should check the entire webserver configuration, and if that is identical as well, compare compile-time defaults. Maybe the phpinfo() call shows more on the actual limits.


PHP has an ini setting which dictates the size of your POST request, you can probably find it in your ini under the name of post_max_size.

Also, if you've got the Suhosin patch installed it will enforce a limit on the number of POST variables you can submit on each request. I think this is around 2000 by default.

0

精彩评论

暂无评论...
验证码 换一张
取 消