Subscribed unsubscribe Subscribe Subscribe

hasen's tech life

Twitter: @hasen

Laravel v5.2でRedisのエラーが出たので対応した.

# Laravel v5.2でRedisのエラーが出たので対応

# exception 'Predis\Connection\ConnectionException' with message 'Failed to parse address ":" [tcp://:]'
in /PATH/TO/vendor/predis/predis/src/Connection/AbstractConnection.php:155

# exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function get() on null'
in /PATH/TO/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:54

$ vi config/database.php
++ "redis" => [
++   "cluster" => false,
++   "default" => [
++     "host" => IP,
++     "password" => PASSWORD,
++     "port" => PORT,
++     "database" => 0,],],