Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LAMP Laravel ErrorException mcrypt_get_iv_size(): Module initialization failed

Tags:

laravel

mcrypt

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?

like image 559
Daniel Wassano Avatar asked Jun 02 '14 14:06

Daniel Wassano


2 Answers

On app/config/app.php just change: 'cipher' => MCRYPT_RIJNDAEL_256,

like image 163
RaySaraiva Avatar answered Nov 19 '22 20:11

RaySaraiva


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.

like image 26
Laurence Avatar answered Nov 19 '22 18:11

Laurence