magento 1.9.3.7
I import product into the magento store but the product is only visible in the shop after I have reindexed the database...
So I went about create a cronjob for this:
php /home/test_user/public_html/shell/indexer.php --reindexall >> /home/test_user/public_html/var/log/magento.cron.log
The log file gives this info:
Content-type: text/html; charset=UTF-8
Usage: php -f indexer.php -- [options]
--status <indexer> Show Indexer(s) Status
--mode <indexer> Show Indexer(s) Index Mode
--mode-realtime <indexer> Set index mode type "Update on Save"
--mode-manual <indexer> Set index mode type "Manual Update"
--reindex <indexer> Reindex Data
info Show allowed indexers
reindexall Reindex Data by all indexers
help This help
<indexer> Comma separated indexer codes or value "all" for all indexers
*****************************************'
I check in magento backoffice that the indexes hasn't been reindexed for about 30 hours, despite the cronjob is set to reindex every 2. hour or so....
I have tried to use php -f, but then the log file contains info about the varipys paramters to php....
What am I doing wrong?
Please try to remove -- in front of reindexall, i.e.:
php /home/test_user/public_html/shell/indexer.php reindexall
or eventually php-cli instead of php, i.e.:
php-cli /home/test_user/public_html/shell/indexer.php reindexall
Most probably you have problems with $_SERVER['argv'], so some ugly solution is to replace:
} else if ($this->getArg('reindex') || $this->getArg('reindexall')) {
with:
} else if (true) {
in shell/indexer.php.
Hello @Loginname,
Please try below command
If you want to generate log report then run below command
php /home/test_user/public_html/shell/indexer.php reindexall > /home/test_user/public_html/var/log/magento.cron.log
or
php /home/test_user/public_html/shell/indexer.php reindexall
--
If my answer is useful, please Accept as Solution & give Kudos