The form action is a controller where I've tried to do the next:
- Code: Select all
public function submitAction()
And I'm getting a warning and an error:
Warning: POST Content-Length of 799518963 bytes exceeds the limit of 10485760 bytes in Unknown on line 0
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 265289728 bytes) in /home/manolo/MiServer/itransformer/app/cache/dev/classes.php on line 3419
So if I can't catch the error in the controller, where can I do it?
I've tried allowing more memory to php.ini, and more length to post_max_size and upload_max_filesize. Finally I've got no errors by changing post_max_size and upload_max_filesize to 2G. I'm not sure if it's a good idea, because I don't want to let upload more than 900KB files.
Is there any way to catch the message before the warnig and error?