Reputation: 11682
I'm send a large array via POST to the server but when I output the $_POST
variable some parameters are cut off
echo '<pre>'.print_r($_POST , true).'</pre>';
It seems the array is always cut off at the same length so if i add elements at the beginning of the array one element at end will get removed.
This happens only on some servers so I guess it's a wrong setting or some server limitations.
The post_max_size
is always above 64 mb and the post is not even close to that size
How can I get around this?
Upvotes: 1
Views: 3184
Reputation: 667
I stumbled upon this question in my search with a similar nature. If anyone lands on this page, you might want to also check out this answer by Mr. Robinson:
Try changing max_input_vars as well. More information: . . . .
https://stackoverflow.com/a/12667018/11787139
Upvotes: 4
Reputation: 3652
You need to set the value of upload_max_filesize and post_max_size in your php.ini :
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M
After modifying php.ini file(s), you need to restart your HTTP server to use new configuration.
You can also use ini_set function:
ini_set('post_max_size', '64M');
ini_set('upload_max_filesize', '64M');
Upvotes: 1