$_POST max array size

42,191

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

Share:
42,191

Related videos on Youtube

MatthiasLaug
Author by

MatthiasLaug

Updated on July 20, 2020

Comments

  • MatthiasLaug
    MatthiasLaug almost 4 years

    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.

    • Treffynnon
      Treffynnon about 12 years
      have you got Suhosin installed on this server? Run php -i | grep -i 'Suhosin' on the command line to find out. See suhosin.post.max_vars and [suhosin.post.max_array_index_length](suhosin.post.max_array‌​_index_length).
    • Ry-
      Ry- about 12 years
      Does this suggestion help?
    • Charles Forest
      Charles Forest about 12 years
      had similar problem when i had to simulate a MYSQL consol... i used $_SESSION vars and i could pass long strings (over 1k rows) without problems.
    • MatthiasLaug
      MatthiasLaug about 12 years
      yes the server ist protecte by Suhosin. I try to fix that max_array_index_length variable
    • MatthiasLaug
      MatthiasLaug about 12 years
      have added suhosin.post.max_array_index_length = 100000 to php.ini but did not help
  • csonuryilmaz
    csonuryilmaz about 11 years
    Link to more information is helpful and solved my problem. One little tip: at OS X Mountain Lion php.ini file location is /private/etc/php.ini. I have found using php --ini command.
  • msbomrel
    msbomrel almost 5 years
    just saved my whole day !
  • Raman Joshi
    Raman Joshi almost 4 years
    I have updated max_input_vars = 5000 but nothing is reflecting on my form update.
  • Kay Angevare
    Kay Angevare over 3 years
    This answer is very useful, I've linked it here as well: stackoverflow.com/a/63169511/11787139