|
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;
}
|