-4

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.

Bizboss
  • 7,256
  • 25
  • 100
  • 163
  • 8
    mcrypt is DEAD, see here https://stackoverflow.com/questions/49323908/php-7-2-with-mcrypt-in-windows – delboy1978uk Oct 01 '18 at 12:02
  • Thanks, I've already seen it, and that it's also deprecated under php 7.1 but I need it for and old project.. – Bizboss Oct 01 '18 at 12:05
  • 9
    @Bizboss Fix your project to use modern encryption libraries like libsodium or openssl. Don't try to crowbar old broken unmaintained code into PHP for force it to work. It's probably impossible anyway as PHP 7.x has a very different codebase from PHP 5.x and is almost certainly now incompatible with abandoned extensions – GordonM Oct 01 '18 at 12:09
  • THAT ^ DO THAT! – delboy1978uk Oct 01 '18 at 14:19
  • Ok ok. can anyone tell me how to do it with Akeneo open PIM system?? – Bizboss Oct 01 '18 at 17:28
  • 3
    What is the exact problem with Akeneo? According to https://github.com/akeneo/pim-community-dev/issues/5937, it does no longer depend on mcrypt since more than a year – Nico Haase Oct 04 '18 at 08:16

3 Answers3

4

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 you PHP version).

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/

zsltg
  • 613
  • 4
  • 13
  • 19
0

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
Jimmix
  • 3,933
  • 2
  • 19
  • 39
-2

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

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

SjamonDaal
  • 15
  • 7