Stiliyan
Stiliyan

Reputation: 176

Laravel uploading to Heroku

Hello guys so I uploaded my app to Heroku. I want to mention that when I run php artisan:serve it all works fine without any problem but when I upload it to the heroku server I have a problem with the following error

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

Now I had the same error localy but I fixed it. now I can't seem to find how to fix it when I the app is uploaded. Any help would be appriciated. Thank you.

Upvotes: 1

Views: 1294

Answers (2)

aoa4eva
aoa4eva

Reputation: 66

As @EddyTheDove mentioned,

php artisan key:generate

This makes sure that the APP_KEY variable is set in the .env file. When you open the .env file, you should see the same key that was generated after you executed the command.

And make sure .env exists

This is located in your project folder.

ALSO:

Remember to use the ENTIRE key.

The "base64:" part of the generated key is also important, because it encodes the random string and provides an encryption key of the required length.

Upvotes: 0

EddyTheDove
EddyTheDove

Reputation: 13259

You need a key in your .env

php artisan key:generate

And make sure .env exists

Upvotes: 3

Related Questions