Php 7.1.9 mcrypt library not found

2.3k Views Asked by At

I have installed Php 7.1.9 on a windows server 2012 machine, if I check the php info I can see that mcrypt is enabled but if I type in shell php -v I have this error:

Unable to load dynamic library 'C:/php/ext\php_mcrypt.dll' - The specified module could not be found.

In fact running a Laravel application I also get some exception related to it.

I have checked ext folder and there is no php_mcrypt.dll .

2

There are 2 best solutions below

0
On

As you can see here mcrypt is deprecated in favour of OpenSSL. From the Deprecated features in PHP 7.1.x:

The mcrypt extension has been abandonware for nearly a decade now, and was also fairly complex to use. It has therefore been deprecated in favour of OpenSSL, where it will be removed from the core and into PECL in PHP 7.2.

1
On

you can use laravel's homestead, it will be a lot easier since it will handle your environment with all the necessary services required by laravel framework.

https://laravel.com/docs/5.5/homestead