I am using the OMDB API (http://omdbapi.com/) to get movie images. I want to cache these so I can load them from my server. I am using PHP Image Cache (http://nielse63.github.io/php-image-cache/). But I am getting the following error:
Allowed memory size of 262144 bytes exhausted (tried to allocate 106496 bytes)
I have set memory_limit in my PHP file to 256, also have tried ini_set('memory_limit','1024M'); before the script runs and I still get the same error. And the allowed memory size of 262144 never changes.
How can I fix this?
Solution
I ended up finding the answer here: Allowed memory size of 262144 bytes exhausted (tried to allocate 24576 bytes)
What I don't really understand is why this fixed it? Changing memory_limit = 256mb to 268435456 but it has done the trick.