my framework is codeigniter
.
I want to use redis. I'm using predis.
https://packagist.org/packages/predis/predis
but I got this error:
An uncaught Exception was encountered
Type: Predis\Connection\ConnectionException
Message: No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379]
Filename: C:\xampp\htdocs\****\application\vendor\predis\predis\src\Connection\AbstractConnection.php
Line Number: 155
my codes:
\Predis\Autoloader::register();
$redis = new \Predis\Client(array(
"scheme" => "tcp",
"host" => "127.0.0.1",
"port" => 6379));
$client = new \Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
echo $value;
return ;
my url to test my code is :
http://localhost:8085/......