[eluser]steelaz[/eluser]
I'm working on custom gallery application and have a problem with memory usage.
My controller uploads and resizes uploaded image. On my local setup, I can upload 4 Mb image, resize it and profiler shows up to 3 Mb memory usage. When I try the same image on staging website, I get an error:
"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 17152 bytes) in /path/system/libraries/Image_lib.php on line 1157"
So controller runs out of memory on resizing image, specifically on this line 17152:
Code:
return imagecreatefromjpeg($path);
If I try smaller image (i.e. 0.5 Mb) everything works fine and profiler shows up to 3 Mb usage on both local and staging setup.
Any idea why this is happening? Could this be a problem with hosting provider?