3

Product cache folder is empty, seems like product images create failed. I have installed gd, and found logs below:

2014-12-04T01:22:17+00:00 ERR (3): Warning: call_user_func() expects parameter 1 to be a valid callback, function 'imagecreatefromjpeg' not found or invalid function name  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 61
2014-12-04T01:22:17+00:00 ERR (3): Warning: imagecopyresampled() expects parameter 2 to be resource, null given  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 376
2014-12-04T01:22:17+00:00 ERR (3): Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'imagejpeg' not found or invalid function name  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 167

Magento: 1.9.0
PHP: 5.6.0
Apache: 2.4.6
Mariadb: 5.5.37

1 Answer 1

7

Function imagecreatefromjpeg is available only if PHP was compiled with GD support and have JPEG support enabled. According to the phpinfo() output JPEG support was not enabled in your GD library. If you have compiled PHP GD library yourself please make sure that libjpeg is installed and --with-jpeg-dir option is set before --with-gd option. Or ask your host to install PHP GD Library with JPEG support (so it is listed in phpinfo() output)

6
  • phpinfo() have showed below, so the PHP was complied with GD support, right?<br> GD Support enabled<br> GD Version bundled (2.1.0 compatible)<br> GIF Read Support enabled<br> GIF Create Support enabled<br> PNG Support enabled<br> libPNG Version 1.5.13<br> WBMP Support enabled<br> XBM Support enabled<br> Commented Dec 4, 2014 at 3:10
  • Oh, sorry, bad text display! Commented Dec 4, 2014 at 3:16
  • According to the output of phpinfo() JPEG support is not listed there. I have updated the answer with details about libjpeg in GD.
    – Jouriy
    Commented Dec 4, 2014 at 3:56
  • Thank you very much! This is the problem, I have rebuilt php with JPEG support, it's working now! Commented Dec 4, 2014 at 7:42
  • @DonghuaLau please accept this as the correct answer.
    – zigojacko
    Commented Jul 17, 2015 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.