W
W
WebDev2016-01-21 13:54:31
Laravel
WebDev, 2016-01-21 13:54:31

Bug in laravel?

The project works, everything is fine, but sometimes an error appears, and it is not displayed on the screen, even with debugging enabled, just a white screen with the standard "Whoops ...".
The following entry appears in the log:

[2016-01-21 10:49:07] local.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php:29
Stack trace:
#0 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(734): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(627): Illuminate\Container\Container->build(Object(Closure), Array)
#2 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(674): Illuminate\Container\Container->make('encrypter', Array)
#3 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(838): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(801): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(772): Illuminate\Container\Container->getDependencies(Array, Array)
#6 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Container\Container.php(627): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(674): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 C:\OpenServer\domains\my-sp.local\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(142): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 C:\OpenServer\domains\my-sp.local\public\index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#10 {main}

After a reboot everything works fine again. What can be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Mitrushchenkov, 2016-01-21
@kirill-93

Google says what you need to do first:
Then, in the .env file, add the received key to APP_KEY and here in config/app.php it should be:
'cipher' => 'AES-256-CBC'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question