PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 9, 2022

[FIXED] Magento 2 reindex mcrypt blowfish error

 January 09, 2022     indexing, macos, magento2, mamp, mcrypt     No comments   

Issue

I'm trying to reindex my Magento indexes through my terminal (I'm using osx & mamp) with this command:

php magento indexer:reindex

When I do this I receive the following error:

Could not open input file: magento

I Googled this error and it says that I'm supposed to use this command:

php bin/magento indexer:reindex

And that results into this error:

Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH'

I looked it up and Google says that this is caused because I don't have mcrypt enabled in my php.ini, but I do have this enabled:

extension=mcrypt.so

How do I fix this?


Solution

Okay so apparently my terminal was pointing to the native PHP shipped with OSX.

I had to go to my terminal, enter which php, which said /usr/bin/php, enter sudo nano ~/.bash_profile, paste export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH, save and close the nano. Then I had to type . .bash_profile and restart the terminal. When I entered php bin/magento indexer:reindex after that it worked!



Answered By - user3478148
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing