Sunday, March 18, 2012

magento更新索引时出错PHP Fatal error: Allowed memory size of 262144 bytes exhausted


magento更新索引时,如果报错:

“PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 140 bytes) in /var/www/vhosts/mywebsite.com/httpdocs/app/code/core/Mage/Index/Model/Mysql4/Process/Collection.php on line 32”

可以通过以下办法解决:

把php.ini 和 .htaccess 文件中的max_memory_limit及memory_limit的值设置为256M或者512M,然后执行命令:

sudo php /258sd/magento/shell/indexer.php -- reindexall

/258sd/magento为你的magento安装根目录。

1 comment:

  1. Dear, again in the valentine's day.I don't know how many of you have me to your chocolate, but I see clearly...This year I can send--to reduce weight tea?
    http://www.mmomesos.com

    ReplyDelete