Laravel : Redis No connection could be made : [tcp://127.0.0.1:6379]
First make sure Redis is actually listening on that port by opening up powershell and typing netstat -aon | more
(this command may need to be enabled in features or installed somehow). If it is listening then check your firewall settings. If if not listening then make sure Redis is started and is configured to listen on that port.
It looks like predis/predis
is a client library only. See https://packagist.org/packages/predis/predis.
You need to install the Redis server, but it looks like it is not officially supported on Windows. See http://redis.io/download. Per information on that page, it looks like there is a Win64 port for Redis here https://github.com/MSOpenTech/redis.
If it still doesn't work after that then update your question with the new error you see.
I had this issue in Ubuntu 18.04
I installed redis in my local system, got solved.
sudo apt-get install redis-server
Ref solution: https://rapidsol.blogspot.com/2018/10/php-fatal-error-uncaught.html
It is showing your server is not accepting connections from outside. You need to provide ip of your redis server.
$client = new Predis\Client('tcp://192.168.1.103:6379');
//$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
echo $value; exit;
if problem still come then try below steps.
So you need to edit : $sudo vi /usr/local/etc/redis.conf
and find the line bind 127.0.0.1 ::1 and change it to #bind 127.0.0.1 ::1 and then find line protected-mode yes and then change it to protected-mode no
and then restart the redis server