Dangvantri113
Dangvantri113

Reputation: 11

predis get error Connection refused while redis-cli ok

I have set up redis like https://redis.io/docs/getting-started/installation/install-redis-from-source/. I run a test on redis-cli that is ok. But when use predis

Predis\Autoloader::register();
$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');

I get error connection refused? Does anyone know what is wrong? Thank you so much!

enter image description here

enter image description here

Upvotes: 1

Views: 155

Answers (0)

Related Questions