I am upgrading php 7.x to 8.0 in CodeIgniter in local wamp server in windows 10. I found this error:-
Message: Undefined constant "MCRYPT_RIJNDAEL_128"
My code is like this:-
$password = trim(openssl_encrypt(MCRYPT_RIJNDAEL_128, $key, $encrypted, MCRYPT_MODE_CBC, $iv), "\0..\32");
From php.net:
This extension has been moved to the » PECL repository and is no longer bundled with PHP as of PHP 7.2.0
You can try install mcrypt extension via pecl. In my case it's Ubuntu:
pecl install mcrypt
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.