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, 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

Magento Forum

Error in the ‘_getNeedMemoryForFile’ function in app/code/core/Mage/Catalog/Model/Product/Image.php line (124)
Jr. Member
Total Posts:  4
Joined:  2008-02-16

I install magento an a windows sytem (wamp) and some error appears after adding some products.. image uploaded dont appears on the backend, after searching on the forum i found one issue ... ugly but it works .. see here

OK, hacking the database directly via PHPMyAdmin fixes the \ rather than /, so at least the thumbnails now show up in the admin back-end, but still no joy with the front end.

When you upload some products images.. the path store on the database is wrong (in the “catalog_product_entity_media_gallery” table)
it store /B/o\BouteilleG5.1litre-thumbnail_1.png instead of /B/o/BouteilleG5.1litre-thumbnail_1.png
if someone found where in the backend we can correct the “path separator” code..i’m interest wink

After fixing the “path separator” problem for windows system (see the post link below) the frontend show me an error on the product page :

:\wamp\www\magentotest\app\code\core\Mage\Catalog\Model\Product\Image.php on line 118 [1] in Mage_Catalog_Model_Product_Image->_checkMemory

i found that if you use a PNG file as product image the php function getimagesize do not return a “channels” index on app/code/core/Mage/Catalog/Model/Product/Image.php (line 123-124)

$imageInfo getimagesize($file);
round(($imageInfo[0] $imageInfo[1] $imageInfo['bits'$imageInfo['channels'Pow(216)) * 1.65);

If someone.. maybe a magento dev guru can fix the channels issue wink
Thanks in advance..and thanks for all dev working on magento… wink

(sorry for my bad english) wink

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