20

hello guys l have installed php7 from this link and this link too.

but when i try to run a Laravel based project there is an error coming up as follows

Mcrypt PHP extension required.

I tried to locate mcrypt.so and change the path in mycrpt.ini but i still get the same error i only get this error i Laravel projects

2
  • 2
    It is best not to use mcrypt, it is abandonware, has not been updated in years and does not support standard PKCS#7 padding, only non-standard null padding that can't even be used with binary data. Instead consider using defuse, it is being maintained and is correct. Commented Apr 4, 2016 at 12:48
  • I'd recommend doing composer require phpseclib/mcrypt_compat. That'll install a pure-PHP mcrypt shim that'll eliminate the need for the mcrypt extension. Commented Aug 23, 2019 at 3:09

1 Answer 1

59

Had the same issue - PHP7 missing mcrypt.

This worked for me in Ubuntu Please try below commands.

sudo apt-get update
sudo apt-get install mcrypt php7.0-mcrypt
sudo apt-get upgrade

Then restarts apache

sudo service apache2 restart

Hope this commands helps!

Sign up to request clarification or add additional context in comments.

3 Comments

For anyone reading my comment, don't forget to restart apache
Could your maybe add in the answer that it is deprecated in 7.1.x and will be removed in 7.2.x? Source: php.net/manual/de/migration71.deprecated.php
@Ankit Sompura please tell the solution for windows

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.