2012-03-21 13 views
22

Tengo una gran forma con> 1000 elementos. Ya se anidan dentro de la estructura de formulario HTML

   {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} 

Es crear un archivo DATAUS para las transacciones bancarias en masa. Pero después de llegar a más de 1000 filas, no se agregan más elementos a la matriz $ _POST y el depurador muestra el siguiente recuento de elementos.

Xdebug Output

ya he añadido max_post_size a 100M para las pruebas, pero nada ayudó.

+1

¿Has instalado Suhosin en este servidor? Ejecute 'php -i | grep -i 'Suhosin'' en la línea de comando para averiguarlo. Ver ['suhosin.post.max_vars'] (http://www.hardened-php.net/suhosin/configuration.html#suhosin.post.max_vars) y [' suhosin.post.max_array_index_length'] (suhosin.post. max_array_index_length). – Treffynnon

+0

¿Ayuda [esta sugerencia] (http://www.php.net/manual/en/ini.core.php#101755)? – Ryan

+0

tuvo un problema similar cuando tuve que simular una consola MYSQL ... usé $ _SESSION vars y pude pasar cadenas largas (más de 1k filas) sin problemas. –

Respuesta

38

Intente cambiar max_input_vars también. Más información: PHP max_input_vars and big forms.

+1

El enlace a más información es útil y resolvió mi problema. Un pequeño consejo: en OS X Mountain Lion, la ubicación del archivo php.ini es **/private/etc/php.ini **. He encontrado usando el comando ** php --ini **. – csonuryilmaz