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

1 개요[ | ]

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
  • 구버전에서는 비교적 짧은 키를 썼는데 버전이 올라가면서 더 긴 키를 사용한다..

2 문제상황[ | ]

laravel.log
[2017-12-04 23:59:42] production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:43
Stack trace:
#0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(27): Illuminate\Encryption\Encrypter->__construct('', 'AES-256-CBC')
#1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(726): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(Object(Closure))
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('encrypter')

3 조치방법[ | ]

  • 앱 키를 재생성하고, 설정 캐시를 클리어하자.
php artisan key:generate
php artisan config:clear

4 #jmnote[ | ]

  • 조치 전에, .env 파일이 제대로 있는지, 그 파일의 내용 중에 APP_KEY가 적절히 작성되어 있는지를 먼저 확인하자.

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}