I have a client whose PHP Memory Limit is actually set to -1 so as to be unrestricted, and ImageCache, perceiving that as less than 96 MB rather than more, displays a warning on the Status Report page. How common it is to set the PHP limit to infinite I don't know, but it might be good to account for it.

Comments

Yura’s picture

How is affecting to the behavior of image cache, I didn't test it. But I think it's not a warning message. Maybe an informational message. Because allowing to allocate maximum amount of memory (-1) of the script is not a good way. This can helps poorly written scripts which is eating up all available memory on the server. Better set it to 96M as well as status notification.

There are a lot of ways to change it. Through hosting control panel(whm/cpanel/plesk), drupal's settings.php, .htaccess file ... or if you have root access;
nano ../usr/local/lib/php.ini then find the line of memory_limit = -1 and then change -1 to 96M

drewish’s picture

Anyone want to roll a patch?

zbabyface’s picture

I have mine set to 500M and it's still giving me an error message ....

ImageCache PHP Memory Limit 50M
It is highly recommended that you set you PHP memory_limit to 96M to use imageapi_gd. A 1600x1200 images consumes ~45M of memory when decompressed and ImageAPI is often operating on two decompressed images at once.

zbabyface’s picture

It was set in one location to 500M and only 45M in another location. Fixed!

fizk’s picture

Status: Active » Closed (won't fix)