The mcrypt_get_iv_size () function is deprecated in Laravel 4.2 on MAMP with PHP 7.1.0 running

I just updated my MAMP server to run 7.1.0. Now I get this error with Laravel 4.2 installations;

Function mcrypt_get_iv_size() is deprecated 

I tried changing

 'cipher' => MCRYPT_RIJNDAEL_128, 

to

 'cipher' => 'AES-256-CBC', 

but to no avail.

Does anyone know how to get around this issue in Laravel 4.2?

Not a duplicate, as described in the comments.

+5
source share
1 answer

You must upgrade your laravel project. mcrypt is deprecated in php 7.1.

You can simply disable the obsolete warning in the php configuration (or add @ before any mcrypt function) if you don't have time to upgrade.

Be careful! it will be completely removed in 7.2 +

Edit: for php 7.2 it is removed in the kernel, but you can add mcryt as a pecl extension.

+4
source

Source: https://habr.com/ru/post/1263786/


All Articles