Scodigo, Inc.

Log In | Register

Cart Items:
0

Memory issue

I have used successfully V1.0 with PHP GD functions. Some of the images involved were quite large. One was about 50MB. Everything worked great. With version 109 it works with smaller images but not with this one.
The error I get:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 51414408 bytes) in Embedded code on line 5

My question is: What are memory limits in new version?

Regards, Brana

Memory issue

Micah Woods's picture

Hello Brana,

Thanks for your post. We should be able to set the memory_limit to -1 when we compile the plug-in, which should remove the memory limit. In the meantime, you can try setting the memory_limit in your code prior to loading the large image. Here's an example that first shows the current setting and then sets it to -1 and then echos out the new setting. The only line of code you need is the middle line that does the setting.

echo ini_get('memory_limit') . "\n";

$set = ini_set('memory_limit', -1);

echo ini_get('memory_limit');

I'm curious to hear if this works for you, so please post back if you have time.

Regards,
Micah

Memory issue

Thanks Micah,
I did as you suggested and it worked just fine.
Regards,
Brana