$indexer="/var/www/clients/client1/web38/web/shell/indexer.php";
if(file_exists($indexer))
{
$idxlist=array("catalog_product_attribute",
"catalog_product_price",
"catalog_product_flat",
"catalog_category_flat",
"catalog_category_product",
"catalog_url",
"catalogsearch_fulltext",
"cataloginventory_stock");
//reindex using magento command line
foreach($idxlist as $idx)
{
echo "reindex $idx \n ";
shell_exec("php /var/www/clients/client1/web38/web/shell/indexer.php --reindex $idx");
exec("php /var/www/clients/client1/web38/web/shell/indexer.php --reindex $idx");
Re-indexing is not working with this way , what issue in my code , please tell me suggestion.
lavlesh kumar shukla