Download and install the php mcrypt extension under windows 10

40.7k views Asked by At

where can I download and how to install the mcrypt extension for php 7.1 (TS,VC14) under Windows 10 / 64 bit. I need it for an akeneo project and this has dependencies using mcrypt (and not other extensions).

I haven't found the right extension dll for it. Thanks for help.

3

There are 3 answers

0
Jimmix On BEST ANSWER

If you need this code run and it uses mcrypt I doubt if it really requires php 7.1 What might help you (however might not be recommended)

  1. Install Wamp for windows link where you can easily switch between PHP 5 and 7

Wamp isn't ideal for custom php versions but I managed to add some "my-versions" if I did not find interesting ones on the list, you can switch versions by click on the icon at the icon try. left or right (check both ways)

check this link also

  1. Much better in customizing your PHP would be Docker but it requires some learning curve instead of clickable Wamp. However with Docker you can do whatever possible to PHP where with Wamp you'll be always having some obstacles (mainly because of lack of resources how to do something, and specific Windows platform).

If you give up with Wamp, install Docker and run command:

docker run --rm -it php:5-apache php -r 'print_r(get_loaded_extensions());'

to check loaded extensions on php 7 with apache run

docker run --rm -it php:7-apache php -r 'print_r(get_loaded_extensions());'

to see if the php version has mcrypt installed and if not then installing it to docker image of php should't be a big deal (let know in comment if you need info bout that)

Here you have an official PHP image for Docker with description how to install extensions Dockerhub PHP image

  1. Maybe this will help mcrypt-module-open
0
SjamonDaal On

Best solutions is to install Linux. use a VM or the Windows Subsystem for Linux.

https://learn.microsoft.com/en-us/windows/wsl/install-win10

3
Tiago Souza On

This example is for PHP 7.4 installed by WAMP in Windows 10 (It will work for others versions if you manage to find the php_mcrypt.dll file for PHP version that you need).

For other PHP versions you may find the php_mcrypt.dll file in https://pecl.php.net/package/mcrypt or in php windows binaries file: in PHP windows binaries files in ext/ folder https://windows.php.net/downloads/releases/