rap2hpoutre / laravel-log-viewer

:dromedary_camel: Laravel log viewer
MIT License
3.14k stars 374 forks source link

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

Closed listen-rain closed 5 years ago

listen-rain commented 5 years ago

No supported encrypter found. The cipher and / or key length are invalid. (View: /www/haoweilai/chinese_classroom/resources/views/vendor/laravel-log-viewer/log.blade.php)

rap2hpoutre commented 5 years ago

Hi and thank you for your contribution! Please have a look at https://github.com/rap2hpoutre/laravel-log-viewer/issues/164 https://github.com/rap2hpoutre/laravel-log-viewer/issues/126 and https://stackoverflow.com/questions/30344141/lumen-micro-framework-php-artisan-keygenerate if you are using lumen)

yevhenlisovenko commented 5 years ago

Hi,

I have the similar issue in Lumen, APP_KEY already there (integrated key:generate command).

Any ideas how to fix this?

Thanks.


(2/2) ErrorExceptionUndefined index: key (View: /app/vendor/rap2hpoutre/laravel-log-viewer/src/views/log.blade.php)
--
in EncryptionServiceProvider.php line 42
at CompilerEngine->handleViewException(object(ErrorException), 0)in PhpEngine.php line 45

(1/2) ErrorExceptionUndefined index: key
--
in EncryptionServiceProvider.php line 42
yevhenlisovenko commented 5 years ago

Found a solution. Maybe it will help somebody...

Just need to add to config/app.php

    'key' => env('APP_KEY'),

    'cipher' => 'AES-256-CBC',
rap2hpoutre commented 5 years ago

Thank you @yevhenlisovenko !