When the server PHP memory limit is set to -1 (i.e. Unlimited), ImageAPI GD reports an error at admin/reports/status saying the memory limit should be increased. (system.module used to do this as well, but has since been changed in Drupal 6 to correctly recognize a memory limit of -1.) The attached patch modifies imageapi_gd_requirements() to recognize -1 as being sufficient memory. The new code is a modified version of the code that already exists in system.install to make this same test.

Comments

drewish’s picture

Status: Needs review » Needs work

Ah I wasn't aware that -1 was a valid memory limit. Just double checked the PHP docs to be sure. The only thing I'd change it to preserve the current behavior of only listing the requirement when there's a problem. That page is noisy enough as it is so I'd rather avoid adding more items to it.

tr’s picture

Status: Needs work » Needs review
StatusFileSize
new570 bytes
new568 bytes

Here you go. As a bonus, I also created a patch to address this same issue in 7.x-1.x-dev. I have tested both, of course.

drewish’s picture

Looks really good. If you had one second to just add a comment that -1 means unlimited memory then those are totally RTBC.

tr’s picture

StatusFileSize
new726 bytes
new726 bytes

Added comment, re-rolled patches:

drewish’s picture

Status: Needs review » Fixed

great, thanks a bunch. committed to HEAD and DRUPAL-6--1

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.