jerauf said:
I just updated to 5.2 and am having a log of problems. I think that I got them all solved but this one is baffling me.
On auth/login and auth/register, I'm getting this:
RuntimeException in compiled.php line 7530: No supported encrypter found. The cipher and / or key length are invalid.
Now, I created a key on installation and it's in config/app.php. The cipher is the same as it was on installation, though: 'AES-256-CBC'.
Has anyone had this problem? How have you solved?
Try run this to generate a new key:
php artisan key:generate
And make sure that it uses that key
And put the new key here:
'cipher' => 'AES-256-CBC',
Or here:
'key' => env('xxxxxx'),
I've made 2 new ones and put them in the latter.
jerauf said:
I figured out out.
http://laravel.io/forum/01-28-2016-no-supported-encrypter-found
I wouldn't call that a proper solution. You should pull it from .env with env('APP_KEY') and use the first or both commands:
php artisan key:generate
php artisan config:cache
I did that and it didn't work, though. The only thing that's worked is the above link.
emilmoe said: php artisan key:generate php artisan config:cache
Thanks.
I am having that problem right now on forge. I've tried everything, it is even using the correct key:
at EncryptionServiceProvider->getEncrypterForKeyAndCipher('uLjED9Y87c9ks83mBGSK8hOWbRuuGhcxcnYCboq7s5w', 'AES-256-CBC') in EncryptionServiceProvider.php line 25
But it still throws the exception "No supported encrypter found. The cipher and / or key length are invalid."
It works on my local machine.
Thanks!
If you get this error, you've tried the above ./artisan commands and you are using apache, check the permissions on your .env file. need to be readable by the user/group that the webserver is running as. "chmod ugo+r .env" should resolve that issue.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community