Support the ongoing development of Laravel.io →
Installation Authentication Forms
Last updated 2 years ago.
0

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

Last updated 8 years ago.
0

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.

0

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
0

I did that and it didn't work, though. The only thing that's worked is the above link.

0

emilmoe said: php artisan key:generate php artisan config:cache

Thanks.

0

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!

0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jerauf jerauf Joined 16 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.