Closed acelaya closed 9 years ago
I'm closing this because I'm almost sure it has nothing to do with Expressive or Diactoros.
@acelaya I'm getting the same problem, did you solve it?
I wasn't able to take the time to investigate it, so no, I didn't.
Alejandro Celaya Alastrué El 8/3/2016 19:03, "Gabriel Schmitt" notifications@github.com escribió:
@acelaya https://github.com/acelaya I'm getting the same problem, did you solve it?
— Reply to this email directly or view it on GitHub https://github.com/zendframework/zend-expressive/issues/164#issuecomment-193894048 .
Thanks @Maks3w
I'm experiencing this error from time to time on an application that I'm developing with Expressive. Sometimes when I try to upload a file I get this Fatal error.
[Mon Oct 19 23:08:17.670338 2015] [:error] [pid 5435] [client 127.0.0.1:43546] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 140367508812784 bytes) in Unknown on line 0, referer: http://foobar.local
I've seen it both in apache's log and by using the PHP's built-in web server, but I'm not sure what's causing it.
What I'm doing is getting the uploaded files from the request (usually just a small file, from 50 to 300 Kb), and parsing them to array in order to be able to validate them with a
Zend\InputFilter\FileInput
object. This is how my parsing method looks like:The FileInput has just one
Zend\Validator\File\IsImage
validator. If I comment the$inputFilter->isValid()
call, then the file is properly uploaded and the error is not produced. I'm not sure if it has something to do with the way the stream is handled in theZend\Diactoros\UploadedFile
object, that grows too much for some reason.