2017-12-20-install-mcrypt-extension-in-php7-2-php-7-3 #10
Comments
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 |
Thanks so much! Your information is precise, works well and saved me a lot of time! Thanks again! |
This is just beautiful. Thanks. The only I had was that it was showing "ERROR: 'phpize' failed" |
Hi comrade |
What is the solution for installing on a PHP 7.1 setup on MacOS ?
|
Another possibility would be to install https://github.com/phpseclib/mcrypt_compat |
Will mcrypt_compat work without changes in the API calling code ? |
It will indeed. |
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 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) |
Thank you very much for this shim library on composer. I just tested this out on one my test sites and this worked properly. |
https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
The text was updated successfully, but these errors were encountered: