[Laravel5 Error] mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported

박상수
1 min readJul 15, 2019

--

laravel 5.0 버전에서 mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported 에러가 발생하였다.

찾아보니 .env파일에 APP_KEY 값을 설정 안해줘서 그렇다.

어플리케이션 키를 artisan을 통해서 생성 후 그것을 APP_KEY에 셋팅하면 완료 정상적으로 동작하는 것을 확인 할 수 있을 것이다.

>php artisan key:generate
Application key [HHAABBCCDDee123213dddww] set successfully

[참고]

https://stackoverflow.com/questions/27254432/mcrypt-decrypt-error-change-key-size

--

--

No responses yet