Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[SOLVED] PHP Fatal Error
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

I just added a product (nothing complex...just a simple product) and one image for that product. Now, when I load the frontend, the image stops the page from loading and checking my logs I see this:

PHP Fatal error:  Ignoring exception from Varien_Image_Adapter_Gd2::__destruct() while an exception is already active (Uncaught Exception in /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/functions.php on line 244in /Applications/MAMP/htdocs/site/app/code/core/Mage/Catalog/Model/Product/Image.php on line 214
 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Someone. Anyone. Maybe a Magento developer could chime in? Seems like they’d know they answer to this. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gabriel Queiroz
Sr. Member
 
Total Posts:  135
Joined:  2008-05-28
Brasília, Brazil
 

Hmm… i didn’t have the time to look through the code, but it seems to be a problem with image resizing.

Is the gd extension enabled in your server?
Is the image type you uploaded supported by gd?

Maybe answering that will help you solve the problem.

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Is the gd extension enabled in your server?

Yep. Everything has been working without a hitch until all of the sudden any images I upload throw that error.

Is the image type you uploaded supported by gd?

Yes. It’s just a regular .jpg file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gabriel Queiroz
Sr. Member
 
Total Posts:  135
Joined:  2008-05-28
Brasília, Brazil
 

Take a look at the /var/reports folder, check if there is a report being generated when you try to add a new image. If there is, post the code here and we’ll check it out.

If there’s no report, try adding this code to /app/code/core/Mage/Core/functios.php, line 243:

$errorMessage .= ": {$errstr}  in {$errfile} on line {$errline}";

    
//add only the next line
    
var_dump($errorMessage);

    throw new 
Exception($errorMessage);

and paste the result here.

Remember to delete it afterwards, otherwise we’ll be creating a new problem.

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Thanks Gabriel. Adding that line gave me more info on the error (which ultimately helped solve the problem).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gabriel Queiroz
Sr. Member
 
Total Posts:  135
Joined:  2008-05-28
Brasília, Brazil
 

Welcome.

What was it? If you post it here it might help someone with the same problem.

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

I had modified the createimagefromjpeg() function (to create decent quality thumbnails) and it was throwing an error.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top