Questions tagged [predis]

Predis is a flexible and feature-complete PHP client library for the Redis key-value store.

Predis requires PHP >= 5.3 and it is entirely written in PHP.

It can be used without the need to build and install a native extension for the interpreter, making it also easier and faster to add new features which is great given how fast the development of Redis proceeds.

Speed up Predis

  • support HHVM >= 2.4.0
  • can be paired with a C extension phpiredis

Frameworks integration

Useful links

254 questions
2
votes
1 answer

How with predis to write data in tree structure?

Reading some manuals on redis I see that tree data are possible, like root object and nested inserted objects. But when in laravel 9.4 app with predis/predis 2.1 I write data with Redis::set('key', serialize( $data ) ); method and in phpRedisAdmin…
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
2
votes
1 answer

predis SCAN slower than KEYS

I need a method to get all keys by prefix to delete them. I've read about the KEYS not being suitable for production, so i made a few tests to check performance. Im using predis 1.1.6 (php) and i tested both in my local machine and in a testing AWS…
AFRC
  • 902
  • 3
  • 9
  • 27
2
votes
1 answer

issue connecting Heroku PHP stack to Redis using Predis

Hope someone can help with this as a new install of PHP and Heroku Redis This is the error I'm getting:- 2020-12-14T19:46:37.368544+00:00 app[web.1]: [14-Dec-2020 19:46:37 UTC] PHP Warning: stream_socket_enable_crypto(): SSL operation failed with…
Rob Edlin
  • 21
  • 2
2
votes
0 answers

Laravel Intermittent php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in AWS Elasticache Redis

Predis\Connection\ConnectionException: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution [tcp://redis-server-of-aws-elasticache-url:6379] My server is experiencing intermittent connection timeout in my laravel app…
2
votes
0 answers

redis/phpredis on laravel with cluster on Elasticache

I've seen a number of articles that address this issue, but none of them seem to be marked as solutions, and none of them work. I have a redis cluster set up on AWS Elasticache and I'm trying to get it working with Laravel. I am able to connect fine…
2
votes
2 answers

php Redis::hscan Retrieve all hashes with wildcard name and condition

So, I have a heap (thousands) of hashes, with names like this: state:city:street And within each one is something like: signId => 10, damaged => 1 I essentially want to do some trickery that I am not sure is possible. I want to get all values for…
2
votes
1 answer

How can i solve " Predis\ClientException : Command 'EXiSTS' is not a registered Redis command. " error?

I use redis class in the my custom provider but doesn't work on the server . There aren't any problems on the local but i didn't understand why it doesn't work on the server. When i use artisan commands i get this error. " Predis\ClientException :…
2
votes
2 answers

Removing Redis from Laravel Project in Windows

My project will not start without Redis running. I get this message if I try to open a page without redis running in Laravel: "No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379]" I've tried 1) php…
user123
  • 247
  • 2
  • 11
2
votes
1 answer

Cannot use 'KEYS' with redis-cluster

One of the applications that I am working on recently moved from redis to redis cluster. Now I have been using the keys command to get all the keys under a keyspace. But now it is saying Cannot use 'KEYS' with redis-cluster. The application written…
Happy Coder
  • 4,255
  • 13
  • 75
  • 152
2
votes
1 answer

How to make Laravel broadcasting/websockets work with Redis Cluster

I got a Redis Cluster server which I created by following this tutorial. This is what my database/config.php setup looks like (see details here): 'redis' => [ 'client' => 'predis', 'cluster' => true, 'options' => [ 'cluster' =>…
abbood
  • 23,101
  • 16
  • 132
  • 246
2
votes
0 answers

Cannot connect to Redis server using Predis?

I am using Predis PHP library to connect to redis server running on AWS EC2 server. When I try to connect to redis installed on my local system, it works fine. Same code does not work when I try to connect to Redis on AWS EC2. I receive below …
Ali Hamza
  • 121
  • 1
  • 1
  • 5
2
votes
1 answer

Using Redis clusters and transactions

While using Redis cluster I get the following error: Cannot use 'MULTI' with redis-cluster. With the just the following call: Redis::multi(); Is there a way to ensure data integrity across the clusters without the use of transactions, since that…
Jorge Y. C. Rodriguez
  • 3,394
  • 5
  • 38
  • 61
2
votes
1 answer

Predis : ERR unknown command 'EVAL' at Client.php:370

I am using Laravel 5.5 and Redis client 3.2.6 and get the following error: ERR unknown command 'EVAL' {"exception":"[object] (Predis\Response\ServerException(code: 0): ERR unknown command 'EVAL' at …
Awais Mushtaq
  • 633
  • 1
  • 10
  • 23
2
votes
2 answers

AWS Elasticache Redis connection using laravel

These are the current configurations I am using. In .env file CACHE_DRIVER=redis REDIS_HOST="Primary Endpoint" REDIS_PASSWORD="Password" REDIS_PORT=6379 REDIS_SCHEME =tcp In config/database.php And I am getting an error like this…
Joshy Mathew
  • 21
  • 1
  • 7
2
votes
0 answers

Trying to achieve a Predis sortby

i'm trying to make a sort by hash value of string field with predis. The official doc says i am to use : sort($key[, array $options]) Now my hash structure looks like this : $key1 = 'Let It Bleed'; $redis->hmset($key1, [ 'year' => 1969, …
Triss
  • 23
  • 4