2

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 .

Stefano Maglione
  • 3,946
  • 11
  • 49
  • 96
  • Did you try to install mcrypt? – Alex Blex Sep 05 '17 at 08:59
  • How can I install it separately? – Stefano Maglione Sep 05 '17 at 09:00
  • See if this helps @StefanoMaglione https://www.myoddweb.com/2010/11/18/install-mcrypt-for-php-on-windows/ – Bananaapple Sep 05 '17 at 09:06
  • Depends on how you installed php. http://windows.php.net/download#php-7.1 binary has been compiled with mcrypt linked statically. It is enabled by default and does not require any dll. Since you have a custom build, you need to refer to its installation instructions. – Alex Blex Sep 05 '17 at 09:10
  • Possible duplicate of [PHP7.1 mcrypt alternative](https://stackoverflow.com/questions/41740600/php7-1-mcrypt-alternative) – Neodan Sep 05 '17 at 09:12

2 Answers2

5

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.

Boian Ivanov
  • 164
  • 1
  • 3
  • 14
-1

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

parpar
  • 329
  • 1
  • 10