When uploading a file through a file type input, the file is an excel type, in which a table with different data must be filled, when it is uploaded to the server it gives me the following error
PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Change the values of
post-max-size (change 8M to 800M).
upload-max-filesize (change 2M to 2000M).
PS: use several values and none worked.
When I did, another error appeared:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes)
Form in cakePHP:
<div class="btn boton btn-default btn-file col-md-7" style="padding-bottom: 4%;">
<?php
echo $this->Form->create(
'Ordenmateriale',
array(
'id' => 'formulario',
'class' => 'boton',
'type' => 'file'
)
);
?>
<?php
echo $this->Form->input(
'archivo',
array(
'type' => 'file',
'class' => 'boton',
'label'=>' <i class="fa fa-paperclip"></i> <br>Migrar Datos :'
)
);
?>
</div>
<div class="col-md-12" style="margin-top: 2%;">
<?php
echo $this->Form->submit(
'Adjuntar Archivo',
array(
'class' => 'btn btn-primary boton col-md-3 ',
'title' => 'Click Aqui para Adjuntar',
'onclick' => 'return validar();'
)
);
echo $this->Form->end();
?>
</div>