Jump to content

[SOLVED] Allowed memory size of X bytes exhausted (tried to allocate Y bytes)


Recommended Posts

I am receiving this error message when using certain modules:

Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

 

Where Y is much less than X, for example:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 9088 bytes) in [...]

 

When using  imagecreatefromjpeg() on a file over 1mb (The 9088 always seems to be the same).

 

I checked the machine, and it looks like someone else has seen this problem before because the max memory limit is set to 128MB.

 

Anyone know what is going on here?

 

Thanks for any help.

I guess the problem turned out to be the dimensions of the image I was using. Even though the actual disk size of the image wasn't that large, imagecreatefromjpeg() needed a lot of space in memory for all those pixels! I'm not sure why the max memory wasn't changing when I adjusted it in php.ini, but it worked when I set it with ini_set().

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.