I try to load url image to be display in slider.
I use this function :
Mage::helper('catalog/image') ->init($product, 'small_image', $file) ->resize($w, $h);
It works partially, on some products, no problem but for some others the website crash. I mean after this line no more html code are generated. There is no error on nginx, php, exception.log or system.log.
So I try to do :
Mage::helper('catalog/image') ->init($product, 'WTFiswrong', $file) ->resize($w, $h);
Here I have errors everywhere (It's normal because it's true) : "Fichier image introuvable." (translate : image not found)
So what's happen in the first case ?
<?php define('MAGENTO_ROOT', getcwd()); $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; require_once $mageFilename; Mage::app(); $id = 397; $x = 200; $y = 100; $product = Mage::getModel('catalog/product')->load($id); echo Mage::helper('catalog/image')->init($product, 'small_image')->resize($x, $y); exit (0); ?>
This display nothing, return 500 error code with no error in error log.
UPDATE 2 :
It seems to be a memory issue, problem solved.