i had install Magento 2 (php 7.0.x), but it showing me error message

** System messages

One or more indexers are invalid. Make sure your Magento cron job is running. **

as per suggestion on forums i also fire query

php -f bin/magento indexer:reindex

but it showing me error on console:

Parse error: syntax error, unexpected '.' in E:\wamp\www\Magentosample\vendor\ma gento\framework\ObjectManager\Factory\AbstractFactory.php on line 93

i am not getting the issue.

i had also add some product (status = Enabled) but the product are not visible on customer view.

Please help me to solve both the issues.

  • Have you remove var folder from root? Dec 13, 2016 at 12:48

3 Answers 3


To reindex in Magento 2, go to root directory of Magento using cli and run this command.

php bin/magento indexer:reindex
  1. Magento 2 relies on cron jobs to be ran every minute. First open up crontab for username that has write permissions for magento root folder (suppose it is _www (on mac osx it is), basically it is the user your php-fpm or httpd running under):

    crontab -u _www -e

    then add the following lines there:

    * * * * * /usr/bin/php  /path_to_magento_root/bin/magento setup:cron:run
    * * * * * /usr/bin/php  /path_to_magento_root/bin/magento cron:run
    * * * * * /usr/bin/php  /path_to_magento_root/update/cron.php

    make sure you put the correct path to php executable, check it with:

    which php
  2. check vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php for syntax errors:

    php -l vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php

    looks like you have one at line 93. (did you edit this file?)


Looks like you edit file E:\wamp\www\Magentosample\vendor\ma gento\framework\ObjectManager\Factory\AbstractFactory.php. And it have syntax error... so try revert all changes, for example by remove vendor folder and run composer install

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.