0

I have installed Homestead and I am trying to work on a Laravel project version 4.2 however I keep getting the following error:

Mcrypt PHP extension required.

I have already installed Mcypt installed on the server and I have enabled it into the PHP 7 ini file. This problem does not want to go away for some reason.

Any recommendations to what I can do in order to enable Mcrypt on my virtual box please?

Phorce
  • 4,424
  • 13
  • 57
  • 107
  • 1
    Possible duplicate of [Laravel requires the Mcrypt PHP extension](http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension) – Rahul Apr 19 '17 at 10:21
  • This answer http://stackoverflow.com/a/26168868/1110423 to be precise. – Alex Blex Apr 19 '17 at 10:24
  • 2
    You should try to upgrade your Laravel version as soon as you can since `mcrypt` is getting the PHP boot. In fact if you install PHP 7.1 you'll get a deprecation notice which may translate to a fatal error in Laravel. – apokryfos Apr 19 '17 at 15:41

1 Answers1

0

Since php7.1 mcrypt is deprecated so you have to downgrade php to php7.0 or install multiple versions of php but don't forget to enable the right version inside your http server config file

or you can use php built in sever like :

cd project_dir/
php7.0 -S localhost:8000
  • Downgrading is not a good idea, there are good reasons mcrypt was removed: It is abandonware, has not been updated in years and does not support standard PKCS#7 (née PKCS#5) padding, only non-standard null padding that can't even be used with binary data. mcrypt has many outstanding [bugs](https://sourceforge.net/p/mcrypt/bugs/) dating back to 2003. The mcrypt-extension is deprecated will be removed in PHP 7.2. – zaph Aug 23 '17 at 17:59