Function mcrypt_get_iv_size() is deprecated
-
Hello,
I'm quite new to Laravel and my first project was to clone from a git repository. Then I executed composer install after that and got this error when i tried accessing the project with the browser.ErrorException (E_DEPRECATED)
Function mcrypt_get_iv_size() is deprecated
Open: C:\laragon\www\projectAvocado\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php/** * Update the block size for the current cipher and mode. * * @return void */ protected function updateBlockSize() { $this->block = mcrypt_get_iv_size($this->cipher, $this->mode); }
I browsed StackEx which is here and they recommend editing cipher to "AES-256-CBC" instead of the default 'cipher' => MCRYPT_RIJNDAEL_128, but I get errors on that too. Looks like AES-256-CBC could not be recognized?
-
@Abigail-Banquil : Which github repo did you clone?
Did you try to generate a new keyphp artisan key:generate
-
Hello
I got it working now.php artisan key:generate
did not work because it detects AES-256-CBC as invalid.
I got it working by
Changing PHP version to 7.0 instead of 7.1