I have the following code in my script:
**$x11 = $image->Resize(width=>$MIwidth, height=>$MIheight);**
it works fine. However, from time to time (on the same image) it returns 500 iternal server error. The image is big (JPG, over 3Mb, over 3000px in width).
I have tried to catch an excpetion with next line: **warn "$x11" if "$x11";**
But the script never comes to that line, always fails before, on resize command. Server error log shows Permature end of script headers.
I have tried to put resize command inside **eval {};** block, but no luck - 500 error anyway!
I have tried to **Minify** an image before Resize, but it fails on Minify command. However, minifying image before resizing will reduce the number of error occurencies! But, anyway, error comes up on minify sometimes!
NOTE: my script working fine. One image can be processed succesfully few times and few times with error, the same image, the same script.
Whats the problem? PLEASE HELP!