REINDEX SOLVED PROBLEM MAGENTO 2 ON AMPPS after check mcrypt on extension from AMPPS (AMPPS->PHP->PHP Extension), on OSX :
I typed:
cd /Applications/AMPPS/www/magento/bin/
php bin/magento indexer:reindex
and I diplayed the following error:
[Exception]
Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed
'MCRYPT_BLOWFISH'in/Applications/AMPPS/www/magento/vendor/magento/framework/Encryption/E
ncryptor.php on line 397
I solved as follows:
from command line and from home:
sudo vi .bash_profile
insert the line: export PATH="/Applications/AMPPS/php-5.6/bin:$PATH"
with the php version used by AMPPS and reboot the command line, in this way magento will use the right PHP version to lunch reindex:
cd /Applications/AMPPS/www/magento/bin/
php bin/magento indexer:reindex
If you would lunch reindex without going to /Applications/AMPPS/www/magento/bin/
you could add in .bash_profile
, another line as follows:
opening .bash_profile
from home:
vi bash_profile
inserting the line:
export PATH="/Applications/AMPPS/www/magento/bin:$PATH"
and then reboot the terminal lunching only the command:
php bin/magento indexer:reindex