laravel No supported encrypter found. The cipher and / or key length are invalid

前端 未结 14 583
后悔当初
后悔当初 2020-11-29 19:58

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

相关标签:
14条回答
  • 2020-11-29 20:56

    if you are using app.php configuration file instead of reading key from .env file, then you can remove the env() function on key variable, ex:

    'key' = env('someRandom36CharsString'),
    

    to

    'key' = 'someRandom36CharsString',
    
    0 讨论(0)
  • 2020-11-29 20:58

    In root directory, if there is .env.example file then change it to .env and then run php artisan key:generate. This worked for me.

    0 讨论(0)
提交回复
热议问题