Reputation: 81
I installed laravel in my new pc and i'm getting this error:
ErrorException mcrypt_get_iv_size(): Module initialization failed
I copied the project from my old pc. mcrypt is installed and enabled, and other pages that do not use laravel are working. I'm running ubuntu 14.04
I created a new laravel project (using laravel new command) and when i try to access i get:
"Whoops, looks like something went wrong."
I opened the log and the error was:
production.ERROR: exception 'ErrorException' with message 'mcrypt_get_iv_size(): Module initialization failed
any ideas?
Upvotes: 6
Views: 8060
Reputation: 3461
Another solution:
"tomgrohl/laravel4-php71-encrypter": "^1.1"
to the require of your composer.jsoncomposer update
'AES-256-CBC'
to the cipher in app/config/app.php
Done!
Upvotes: 0
Reputation: 620
Make sure you run php 7.0, and add this string "MCRYPT_RIJNDAEL_256" (without the quotes) to the cipher in app.php. after generate a new key (php artisan key:generate) and add the new key. This works for me.
Upvotes: 0
Reputation: 383
On app/config/app.php just change: 'cipher' => MCRYPT_RIJNDAEL_256,
Upvotes: 11
Reputation: 60030
Run php artisan key:generate
on your command line to refresh your application key.
Then clear your cache and sessions and try again.
I had this same problem today, and it was because of how Laravel 4.2 uses the new encryption method.
Upvotes: 3