Use of Undefined Constant Mcrypt_Rijndael_128 - Assumed 'Mcrypt_Rijndael_128'

Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'

More simple way on ubuntu

  • apt-get install php5-mcrypt
  • mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
  • php5enmod mcrypt
  • service apache2 restart

Note: if you don't have "/etc/php5/conf.d" just skip that step and it will work ok

check http://php.net/manual/en/mcrypt.installation.php

Is mcrypt_encrypt() function not working in PHP 7.2?

I have found solution of my query. Please check below

function encrypt($plaintext,$key)
{
return base64_encode(openssl_encrypt($plaintext, 'aes-128-ecb', $key, OPENSSL_RAW_DATA));
}


Related Topics



Leave a reply



Submit