moh_abk's avatar

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

I've come across various solution to this problem for laravel but not for lumen.

lumen doesn't have a config/app.php file. I've also copied that over from my laravel app and added $app->configure('app'); to my bootstrap\app.php but still no joy.

I have an app key in my .env file set. The documentation says to;

Before using Lumens's encrypter, you should set the APP_KEY option of your bootstrap/app.php file to a 32 character, random string.

0 likes
1 reply
PascaleBeier's avatar

You also need to uncomment Dotenv::load for your .env file to be parsed. Did you already do this?

// /bootstrap/app.php
<?php

require_once __DIR__.'/../vendor/autoload.php';

Dotenv::load(__DIR__.'/../');

Please or to participate in this conversation.