2

When I run reindex all, I got this error

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes) in /home/users/mydomain/www/lib/Varien/Simplexml/Element.php on line 195

On my htaccess file I have

<IfModule mod_php5.c>
php_value memory_limit 512M
php_value max_execution_time 1800
php_flag magic_quotes_gpc off
php_flag session.auto_start off
</IfModule>

When I check my php.info I think 'memory_limit 512M' (How can I check clearly?)

so due to the error, it seems the reindex is not complete, How can I solve the issue?

3

It looks to me based on what you state at the start (run reindex all) that you are currently using the command line shell/index.php to do your reindexing.

In the default configuration of servers, PHP runs two ini files one which deals with command line, and one which deals with your web server. So the .htaccess information would not actually be used.

Depending on your server configuration, there are a few places that the file may exist so if you have a look in

/etc/php

/etc/php5

You will hopefully find a sub directory structure which reveals a cli folder perhaps under conf.d and within that you will have the php.ini file which is used to configure the CLI tool you are using. This file needs to have the value for memory_limit increased.

If you run a phpinfo() from the CLI you may find it will tell you in the output the actual ini file loaded (and of course the information to do with the current values.

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.