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

Daniel
  • 1,155
  • 1
  • 10
  • 15
Ali Bedaer
  • 395
  • 1
  • 4
  • 12
  • 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](https://github.com/defuse/php-encryption), it is being maintained and is correct. – zaph Apr 04 '16 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. – neubert Aug 23 '19 at 03:09

1 Answers1

60

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!

Artur Haddad
  • 1,429
  • 2
  • 16
  • 33
Ankit Sompura
  • 765
  • 6
  • 10