2014-09-16 4 views
1

Cron Je réindexer index magento via la ligne de commande ssh avec ce code:Magento indexeur en cours d'exécution via ssh, mais pas d'emploi

php -f [path to store]/shell/indexer.php reindex 

ou index individuels avec ce code:

php -f [path to store]/shell/indexer.php -- reindex [index] 

Et cela fonctionne très bien . Cependant chaque fois que j'essaie de réindexer via cron je reçois ceci:

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 

Des idées? Merci

+0

Quelle est la tâche cron que vous avez définie, pouvez-vous partager? –

+0

J'ai essayé quelques formats différents, mais c'est comme ça: php -f /home/[nom d'utilisateur]/public_html/shell/indexer.php - reindex catalogsearch_fulltext –

Répondre

2

Essayez d'ajouter le chemin vers PHP. Essayez ceci:

/usr/local/bin/php -q [path to store]/shell/indexer.php --reindex catalogsearch_fulltext 

Cela dépendra de votre chemin vers PHP!

+0

Sulman votre homme. Passez 2 jours à lutter contre cela. Merci –

0

vous devez nous fournir le nom de indexeur

php -f [path to store]/shell/indexer.php reindex **indexer_code** 

indexer_code comme mention ci-dessous. par exemple. // réindexer tous les index

php -f [path to store]/shell/indexer.php reindex all 

Voici la liste des codes indexeur

catalog_product_attribute  Product Attributes 
catalog_product_price   Product Prices 
catalog_url     Catalog URL Rewrites 
catalog_product_flat   Product Flat Data 
catalog_category_flat   Category Flat Data 
catalog_category_product  Category Products 
catalogsearch_fulltext  Catalog Search Index 
cataloginventory_stock  Stock Status 
tag_summary     Tag Aggregation Data 
+0

J'ai essayé mais j'ai le même résultat que celui indiqué dans ma question. Je n'ai aucune idée de pourquoi ça ne marche pas puisque ça marche bien dans ssh –

+0

as-tu essayé php -f [chemin vers le magasin] /shell/indexer.php reindex tous les –

+0

il suffit d'aller sur le chemin racine de magento puis de changer cette commande php - f indexer.php reindex catalog_product_flat –

0

La réponse de sulman fonctionne, mais seulement si vous l'ajoutez via la commande crontab -e dans ssh. Je ne sais pas si cela est dû à des autorisations. Dans mon cas, indexer.php avait 755

Questions connexes