Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
No product images [Work around]
 
thomas_clight
Jr. Member
 
Total Posts:  3
Joined:  2008-05-01
Paris
 

Hi all,
I’m testing Magento 1.0.19700 locally with Easyphp 2.0b1,Windows Visa. With the sample data I had images on the welcome page but when clickered a product I just got place holders.

I finally traced it to :
app/code/core/mage/Catalog/Model/Product/Image.php, line 87 :

protected function _checkMemory($file = null)
{
// print ‘$this->_getMemoryLimit() = ‘.$this->_getMemoryLimit();
// print ‘$this->_getMemoryUsage() = ‘.$this->_getMemoryUsage();
// print ‘$this->_getNeedMemoryForBaseFile() = ‘.$this->_getNeedMemoryForBaseFile();

return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file));
}

(The commented debug lines are orginal - not mine - the core programmer had trouble too!)
$this->_getMemoryLimit is a few lines below and calls ini_get(’memory_limit’) which bizarrely returns nothing
my php.ini has memory_limit = 16M, but even testing outside Magento ini_get returns nothing.
A google search suggests I should compile with ---enable_memory_limit, but I don’t know how to do this.
My work around is :

protected function _checkMemory($file = null)
{
//return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file));
return 1;
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
hibs
Jr. Member
 
Total Posts:  4
Joined:  2008-05-21
 
thomas_clight - 03 May 2008 05:54 AM

Hi all,
I’m testing Magento 1.0.19700 locally with Easyphp 2.0b1,Windows Visa. With the sample data I had images on the welcome page but when clickered a product I just got place holders.

I finally traced it to :
app/code/core/mage/Catalog/Model/Product/Image.php, line 87 :

protected function _checkMemory($file = null)
{
// print ‘$this->_getMemoryLimit() = ‘.$this->_getMemoryLimit();
// print ‘$this->_getMemoryUsage() = ‘.$this->_getMemoryUsage();
// print ‘$this->_getNeedMemoryForBaseFile() = ‘.$this->_getNeedMemoryForBaseFile();

return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file));
}

(The commented debug lines are orginal - not mine - the core programmer had trouble too!)
$this->_getMemoryLimit is a few lines below and calls ini_get(’memory_limit’) which bizarrely returns nothing
my php.ini has memory_limit = 16M, but even testing outside Magento ini_get returns nothing.
A google search suggests I should compile with ---enable_memory_limit, but I don’t know how to do this.
My work around is :

protected function _checkMemory($file = null)
{
//return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file));
return 1;
}

Using Magento 1.1.19870 this worked for me as well - cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
easymobiles
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-03-10
 

Thanks very much for this tip Thomas.  I had the same problem and was tearing my hair out.  All fixed now.

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
martin_klima
Jr. Member
 
Total Posts:  6
Joined:  2008-07-09
 

This workaround works for magento-1.0.19870.4 with EasyPhp 2.01 on Windows system. Perfect job, many thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53204 users|800 users currently online|107238 forum posts