Skip to content
Advertisement

how to solve ‘Allowed memory size of’ error when streaming big files in php?

I have trying to make some “replacement-wrapper” over stream described in this : [article][1]

But when I tested it with not so big file (about 120M) it showed me an error:

JavaScript

Here is my wrapper:

JavaScript

}

Here is my сlient code:

JavaScript

Also I have found some PHP bug [here][2] but I dont know how to solve my problem.

I have PHP 7.3.7 (cli) (built: Jul 3 2019 14:34:10) ( ZTS MSVC15 (Visual C++ 2017) x64 ) On windows 10/ Please help) [1]: https://stackify.com/a-guide-to-streams-in-php-in-depth-tutorial-with-examples/ [2]: https://www.hashbangcode.com/article/php-custom-stream-filters

Advertisement

Answer

add your php code header

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement