I just deploy my laravel
site to Heroku. I believe Heroku is using PHP 7.1 by default.
I did everything, and finally got it to deployed, but I see error on my page
Function mcrypt_get_iv_size() is deprecated
config/app.php
'cipher' => 'AES-256-CBC',
I've already run php artisan key:generate
.
Any hints on how I prevent that ?
As you have discovered, mcrypt_get_iv_size()
is deprecated as of PHP 7.1.
Upgrading to Laravel 5.1 or later should make this warning go away since it uses openssl
instead of mcrypt
.
Note that Laravel 5.1 (a long-term support release) will receive two years of bug fixes and three years of security fixes from its release in July, 2016. Non-LTS releases receive six months of bug fixes and one year of security fixes.
I recommend upgrading your development environment to the latest version of PHP, then upgrading either to the latest release or the latest LTS release and making sure your app still works as expected.
Once you're happy, push to Heroku.
This method worked for me:
$iv_size = openssl_cipher_iv_length('AES-256-CBC');//16
Or
else you can use other git repository "defuse/php-encrption" for existing version to work