Search code examples
phpmcryptphp-7.1akeneo

Download and install the php mcrypt extension under windows 10


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.


Solution

  • 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