When using fopen ("php: // input") to download a file with 120 MB, we get a warning "out of memory" from php. For php memory_limit is set to 256 MB, and we have enough memory.
We removed all the code except fopen ("php: // input") and it still does not work, so the error should be there.
We tried different memory limits and about 500 MB the error disappears. However, we really should not use 500 MB, so the question remains: why do we get an exhausted memory error using fopen in a file size of 115-120 MB.
Our php test file:
<?php $inputHandler = fopen('php://input', "r"); ?>
And the error:
262144000 bytes exhausted (tried to allocate 120829495 bytes)
I hope someone can help us. This is driving us crazy!
Thanks in advance!
source share