If I upload the attached image (a 110 KByte JPEG, 4000x3000) in ImageBrowser called from FCKEditor, PHP memory limits are exceeded by some underlying module.

Unfortunately, ImageBrowser cannot handle the situation: it reports "An HTTP 0 error occurred" upon upload and then it stops working completely: if I close the ImageBrowser window and reopen it, I only get a blank page.

My error log shows:
[error] [client ...] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16000 bytes) in .../includes/image.gd.inc on line 190, referer: ...imagebrowser/view/browser&app=FCKEditor

Even if does not depend on ImageBrowser, could it be possible to die more gracefully and ignore the faulty image somehow?

I use a PHP memory_limit of 64M, which is a generous limit on shared hosting. Anyway, whatever the limit is set to (even if I set it to the 96 MBytes suggested by ImageAPI) uploading a very big image will break ImageBrowser, which is quite undesirable.

CommentFileSizeAuthor
#1 imagebrowser-test-4000x3000.jpg110.5 KBpescetti
test-big.jpg110.5 KBpescetti

Comments

pescetti’s picture

StatusFileSize
new110.5 KB

Attaching a sample image which breaks ImageBrowser.

jdelaune’s picture

Priority: Normal » Critical

Thanks I will look into this.

jthorson’s picture

Definately a show-stopper for my sites ...

Any progress to report?

Incidently, once I tried to upload the large image, I got the garbage output reported in http://drupal.org/node/486730.

jdelaune’s picture

Sure I did look into it but couldn't locate where it was falling over, as it often changes in the debug process.

It's possible that the error lies in the one of the modules IB relies on. i.e. image, image api etc.

jdelaune’s picture

Assigned: Unassigned » jdelaune
Priority: Critical » Normal

Ok just tested this in v2 which I have been working on tonight, and good news the whole module won't bail out now. v2 no longer relies on 'Image' module so that must have been part of the issue.

Just need to tidy up a few more things but looks like we will have this one fixed when version 2 comes out.

jdelaune’s picture

Issue opened here as the fatal error happens within ImageAPI.

#516920: Better error handling?

jdelaune’s picture

Status: Active » Closed (fixed)

Not much I can do until that issue gets fixed.