I am building a project using Laravel. It was working fine on localhost, but when I upload it to the server (the server has comodo ssl installed), I receive the following er
I was suffering with this problem for a few too many hours before I discovered that the key was being cached in the bootstrap\cache\config.php. Deleted the file and my site loaded fine (i.e. there was otherwise no problem with my config).
I discovered this by adding some debug output to boostrap\cache\compiled.php to make it spit out the cipher and key (somewhere around line 7010). Then dug around to see how it was picking up the config and found it uses a cache config file.
I have same issue before and I fixed it follow this way:
Go to config/app.php,
change "cipher" => "anything"
to
'cipher' => MCRYPT_RIJNDAEL_128,
Add "illuminate/html": "~5.0"
to require section of your composer.json
file. Just like this:
...
"require": {
...
"illuminate/html": "~5.0"
...
},
...
Then run composer install
command. When composer install
gets complete. run php artisan key:generate
. You will get a message like this:
Application key [get 32 char key] set successfully.
solved with:
php artisan key:generate
I fixed it by running this:
php artisan config:cache
In my case, I need to enable mcrypt extension.
But first, check if you already have it:
$ sudo apt-get install -y mcrypt php5-mcrypt
Check if mcrypt module is loaded:
$ php -m | grep mcrypt
if nothing shows, is because is not loaded, but you already have installed above right? So do this:
$ php5enmod mcrypt
$ sudo service apache2 restart
Check again and you should see mcrypt instead of nothing. Thats a good sign, reload you app and go fix your next error ;)
$ php -m | grep mcrypt
mcrypt