Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2017-12-20-install-mcrypt-extension-in-php7-2-php-7-3 #10

Open
arzzen opened this issue Jan 17, 2018 · 12 comments
Open

2017-12-20-install-mcrypt-extension-in-php7-2-php-7-3 #10

arzzen opened this issue Jan 17, 2018 · 12 comments
Labels

Comments

@arzzen
Copy link
Owner

@arzzen arzzen commented Jan 17, 2018

https://lukasmestan.com/install-mcrypt-extension-in-php7-2/

@arzzen arzzen added the comments label Jan 17, 2018
@nishanth6
Copy link

@nishanth6 nishanth6 commented Apr 5, 2018

Issue Solved when installing php7.2-mcrypt

I was also facing the same issue. Check this link https://stackoverflow.com/q/48275494/7713811 to get the right solution for installing it in PHP

@toens
Copy link

@toens toens commented Nov 9, 2018

Thanks so much! Your information is precise, works well and saved me a lot of time! Thanks again!

@anjanesh
Copy link

@anjanesh anjanesh commented Jan 27, 2019

This is just beautiful. Thanks. The only I had was that it was showing "ERROR: 'phpize' failed"
But I got that resolved by apt-get install php7.2-dev

@RMSHT
Copy link

@RMSHT RMSHT commented Feb 16, 2019

This is just beautiful. Thanks. The only I had was that it was showing "ERROR: 'phpize' failed"
But I got that resolved by apt-get install php7.2-dev

Hi comrade
I had like error too and I resolved by 'sudo apt-get install php-dev' command

@anjanesh
Copy link

@anjanesh anjanesh commented Feb 27, 2019

What is the solution for installing on a PHP 7.1 setup on MacOS ?

sudo pecl install mcrypt-1.0.2
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
pecl/mcrypt requires PHP (version >= 7.2.0, version <= 7.4.0, excluded versions: 7.4.0), installed version is 7.1.23
No valid packages found
install failed
@arzzen arzzen changed the title 2017-12-20-install-mcrypt-extension-in-php7-2 2017-12-20-install-mcrypt-extension-in-php7-2-php-7-3 Mar 5, 2019
@terrafrost
Copy link

@terrafrost terrafrost commented Aug 27, 2019

Another possibility would be to install https://github.com/phpseclib/mcrypt_compat

@anjanesh
Copy link

@anjanesh anjanesh commented Aug 27, 2019

Will mcrypt_compat work without changes in the API calling code ?

@terrafrost
Copy link

@terrafrost terrafrost commented Aug 27, 2019

Will mcrypt_compat work without changes in the API calling code ?

It will indeed.

@anjanesh
Copy link

@anjanesh anjanesh commented Sep 10, 2019

What will happen if the function already exists in PHP 7.0 and install mcrypt_compat ? Will it throw an error ?

@terrafrost
Copy link

@terrafrost terrafrost commented Sep 10, 2019

What will happen if the function already exists in PHP 7.0 and install mcrypt_compat ? Will it throw an error ?

It'll work without issue. Under the hood, phpseclib will utilize OpenSSL, if it's available, then mcrypt, then it's own pure-PHP implementation.

mcrypt_compat, in turn, defines functions like phpseclib_mcrypt_list_algorithms and then does this to define mcrypt_list_algorithms:

if (!function_exists('mcrypt_list_algorithms')) {
    function mcrypt_list_algorithms($lib_dir = '')
    {
        return phpseclib_mcrypt_list_algorithms($lib_dir);
    }
}

This approach is pretty common in the world of shims (eg. password_compat, random_compat, sodium_compat, etc)

@anjanesh
Copy link

@anjanesh anjanesh commented Sep 13, 2019

Thank you very much for this shim library on composer. I just tested this out on one my test sites and this worked properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants