Framework: mcrypt_get_iv_size() is deprecated

Created on 9 Nov 2016  路  7Comments  路  Source: laravel/framework

  • Laravel Version: 5.1.45
  • PHP Version: 7.1
  • Database Driver & Version:

Description:

mcrypt_get_iv_size() is deprecated by PHP 7.1
what can I do now to make my app work

Steps To Reproduce:

Most helpful comment

to solve this just change cipher in app.php from 'MCRYPT_RIJNDAEL_128' to 'AES-256-CBC'

All 7 comments

to solve this just change cipher in app.php from 'MCRYPT_RIJNDAEL_128' to 'AES-256-CBC'

this issue persists in laravel 4.2 even after changing it to AES-256-CBC.

you need to upgrade to a newer laravel

@GrahamCampbell in laravel 4.2 new patch was released for php 7 i thought it supports php7.1 so i asked here. there are enterprise apps even if we want we can't upgrade it to 5 yet.

It does still support it. It just uses deprecated features,

You can use PHP 7 instead of PHP 7.1. For laravel 4 add this to the beginning of the config/app.php:

error_reporting(E_ALL ^ E_DEPRECATED);

It looks dirty, but I'm afraid there is no a better way to avoid the error at the moment.

source here

@kamil-kielczewski This worked for me on Laravel 4.1 on PHP 7.1. Are there any downsides on this or this would appear to make the site work but have some functionalities down? Should I follow the recommendation in https://laracasts.com/discuss/channels/laravel/function-mcrypt-get-iv-size-is-deprecated-error-in-laravel/replies/349042 to upgrade? Thanks!

Was this page helpful?
0 / 5 - 0 ratings