Recently i tried to install YII2 ,i got “The mcrypt PHP extension is not installed.” error.
In this post, I will show you how to fix this issue and show you how to install mcrypt.
What’s mcrypt?
MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions. It allows developers to use a wide range of encryption functions, without making drastic changes to their code. It allows users to encrypt files or data streams without having to be cryptographers.
I am using suing ubuntu, below are the commands for installing mcrypt. Open your terminal run the commands.
1 2 3 4 5 6 |
# install php module called php5-mcrypt $ sudo apt-get install php5-mcrypt # enable mcrypt module $ sudo php5enmod mcrypt # restart service $sudo service apache2 restart |
That’s it.
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.