REINDEX 解決済みの問題 MAGENTO 2 ON AMPPS (AMPPS->PHP->PHP 拡張機能) の mcrypt をチェックした後、OSX で AMPPS からの拡張機能を使用する場合:
私が入力した:
cd /Applications/AMPPS/www/magento/bin/
php bin/magento indexer:reindex
そして、次のエラーを表示しました:
[例外]
通知: 未定義の定数 MCRYPT_BLOWFISH の使用 - 397 行目の /Applications/AMPPS/www/magento/vendor/magento/framework/Encryption/E ncryptor.php で「MCRYPT_BLOWFISH」と想定
私は次のように解決しました:
コマンドラインとホームから:
sudo vi .bash_profile
次の行を挿入しますexport PATH="/Applications/AMPPS/php-5.6/bin:$PATH"
。AMPPS で使用される php バージョンを使用して、コマンド ラインを再起動します。このようにして、magento は適切な PHP バージョンを使用して再インデックスを開始します。
cd /Applications/AMPPS/www/magento/bin/
php bin/magento indexer:reindex
に行かずに再インデックスをランチする場合は、次のように別の行を/Applications/AMPPS/www/magento/bin/
追加できます。.bash_profile
自宅から開く.bash_profile
:
vi bash_profile
次の行を挿入します。
export PATH="/Applications/AMPPS/www/magento/bin:$PATH"
次に、コマンドのみを起動してターミナルを再起動します。
php bin/magento indexer:reindex