Mcrypt PHP extension required OS Mac os

0

I'm having this problem when I try to give a php artisan serves, it gives me this guy

Mcrypt PHP extension required

I made php -m and I saw that it is not there as an extension and I did the reinstallation and installation and it does not appear

    
asked by anonymous 04.05.2018 / 18:23

1 answer

0

As I already replied to link

The mcrypt module was already deprecated since PHP 5.5 (at least several functions of it) and was once removed in PHP7.2, as link :

  

Warning This feature was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0.

     

Alternatives to this feature include:

     
  • [Sodium] [1] (available as of PHP 7.2.0)
  •   
  • [OpenSSL] [2]
  •   

If your Laravel really needs it then it is because you are using an older version of Laravel, or you are using some old additional library , which probably already has better alternatives.

If your PHP is 7.2 has nothing to do, you will either need to update your deprecated lib or use an older version of PHP.

If you are using a lower version of PHP 7.2 then you can try to install via brew:

If it's PHP7.0.x:

brew install php70-mcrypt

If it's PHP7.1.x:

brew install php71-mcrypt

In newer versions of the Mac you may have to manually add in php.ini extensions after installing via brew

If you are using Xampp I think it already comes with such an extension (provided it is an older version of PHP, such as 7.1)

    
04.05.2018 / 18:28