Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$_POST max array size

Tags:

arrays

post

php

I have a really big form with >1000 Elements. They are already nested inside the form html structure

                {foreach from=$result item=item}                     <tr>                         <td><input type="text" value="{$item.receiver.name}" name="item[{$item.id}][receiver][name]" /></td>                         <td><input type="text" value="{$item.receiver.account_number}" name="item[{$item.id}][receiver][account_number]" /></td>                         <td><input type="text" value="{$item.receiver.bank_code}" name="item[{$item.id}][receiver][bank_code]" /></td>                         <td><input type="text" value="{$item.amount}" name="item[{$item.id}][amount]" /></td>                         <td><input type="text" value="{$item.usage.first}" name="item[{$item.id}][usage][first]" /></td>                         <td><input type="text" value="{$item.usage.second}" name="item[{$item.id}][usage][second]" /></td>                         <td><input type="text" value="Yourdelivery GmbH" name="item[{$item.id}][usage][third]" /></td>                         <td>                             <input type="checkbox" value="1" name="item[{$item.id}][import]" />                         </td>                     </tr>                 {/foreach} 

It is to create a DATAUS file for mass bank transactions. But after reaching more than 1000 rows no more elements are added to the $_POST array and the debugger shows the following element count.

Xdebug Output

I already added max_post_size to 100M for testing, but nothing helped.

like image 526
MatthiasLaug Avatar asked Mar 21 '12 14:03

MatthiasLaug


People also ask

What is the max length of an array?

The maximum allowable array size is 65,536 bytes (64K). Reduce the array size to 65,536 bytes or less. The size is calculated as (number of elements) * (size of each element in bytes).

How big can a PHP array be?

There is no max on the limit of an array. There is a limit on the amount of memory your script can use. This can be changed in the 'memory_limit' in your php.

How do you create an array with maximum size?

Java uses an integer as an index to the array and the maximum integer store by JVM is 2^32. so you can store 2,147,483,647 elements in the array. In case you need more than max-length you can use two different arrays but the recommended method is store data into a file. because storing data in the file has no limit.

How big can Java array be?

The 32-bit Java int can go to a maximum of 2,147,483,647, so that is the theoretical maximum Java array size.


1 Answers

Try changing max_input_vars as well. More information: PHP max_input_vars and big forms.

like image 83
Michael Robinson Avatar answered Sep 28 '22 06:09

Michael Robinson