Questions tagged [phpredis]

A fast REDIS client library for PHP

A fast Redis client library for PHP, originally created by Owlient and as of 2017 maintained by Michael Grunder and Pavlo Yatsukhnenko on github. This library provides an API for communicating with Redis, a persistent key-value database written in ANSI-C for Posix systems.

201 questions
0
votes
1 answer

What is the proper way to initialize redis cluster

On the docs it does not outline what the best practices are - if someone has let's say 8 redis nodes, would you initialize phpredis with a server array containing all 8 nodes? From my understanding, the client will iterate over all the nodes given…
Ewan Walker
  • 184
  • 1
  • 1
  • 11
0
votes
2 answers

How do I install/use PhpRedis on Google App Engine?

I would like to use the super fast PhpRedis on Google App Engine, how does one go about doing that if its possible?
AEQ
  • 1,339
  • 1
  • 16
  • 20
0
votes
1 answer

phpRedis cluster can't use $redis->lsize('...')

I am a chinese student and a new freshman for learn redis. I have completed a project by using the class Redis, but now I will move my project to cluster, so I am using class RedisCluster. Unfortunately, I suffer a deadly problem, I find that the…
shi jianfeng
  • 81
  • 1
  • 1
  • 4
0
votes
1 answer

mainting the order in redis with zet and set

I have a bookings which are stored in hash HSET bookings booking_id "1",booking_info .. .. and have a zset with timestamp as a score and value as a booking_id these are the booking create date e.g zet create_date i also have a 4 types of sets…
nick
  • 1
0
votes
1 answer

What is method for Redis function ZUNIONSTORE() at library phpredis?

I use library phpredis. What is alternative function in library phpredis for the native redis function ZUNIONSTORE()
Arsen
  • 21
  • 7
0
votes
1 answer

How to know SUBSCRIBER is running or not befor PUBLISHING event in php redis pubsub?

I am using php redis pubsub I noticed that if subscriber in not running and if we publish event to channel then that event will be dropped . So because of that reason before publishing something to channel I want to check subscriber is running or…
Swapnil Dalvi
  • 999
  • 9
  • 23
0
votes
0 answers

redis retrieve from sorted set using parameters

I Got the following kind of data stored on redis {" {"userId":"00001","userName":"You","xp":0,"type":"element","honor":500, "position":2}":"2", "{"userId":"00002", "userName":"Another","xp":0,"type","honor":500,"position":1}":"1" } So I need…
Morgoth
  • 15
  • 7
0
votes
1 answer

phpredis Redis::subscribe() expects parameter 2 to be a valid callback

I'm having trouble to use the subscribe method. Any help would be welcome in order to get it working. Following php unit test gives me the following error. This is the example as phpredis provides…
Marco
  • 4,817
  • 5
  • 34
  • 75
0
votes
2 answers

How to use Redis in php?

I installed redis 2.8.12 and configured phpredis. Then I called redis instance in php class. But there is no result, can you help me? public function __construct() { try { echo ':) '; $newRedis = new Redis(); …
user2789934
  • 265
  • 2
  • 3
  • 11
0
votes
1 answer

Redis | Replication and common disk storage

I am just starting to use Redis for the first time. I have gone through the documentation and I came to know that Redis can be used in replication mode. But, I have some questions which are still un-answered. Let's have a quick view of use-case I…
Tausif Khan
  • 2,228
  • 9
  • 40
  • 51
0
votes
1 answer

Call value from key stores in Redis using phpredis

I using Phpredis and am trying to get information from the following key called "statHistory" I am new to redis and not sure how to call each value individually. I am able to connect to redis using php and have tested it using the ping command. It…
Unicus
  • 9
  • 1
  • 4
0
votes
1 answer

Running out of memory while storing lots of data in redis

I'm trying to execute this query in PHP Redis (Predis): for ($i=0; $i < 10000000; $i++) { $client->SADD('key:'.$i, $i); } This code takes a long time, but it shouldn't run out of memory, besides, I've edited my php.ini file and changed…
Pars
  • 4,932
  • 10
  • 50
  • 88
0
votes
1 answer

using phpredis - ubuntu 12.04

I am trying to install phpredis library for using redis in my php scripts. I folloed the instructions here https://github.com/nicolasff/phpredis , ran the script for apache usage too. I added a redis.ini to /etc/php5/cli/conf.d in which I write…
neeraj
  • 1,191
  • 4
  • 19
  • 47
0
votes
1 answer

option for lexicographical order in zrange?

When i add a score for a key using zincrby, it increases the score and puts the element in lexicographical order. Can i get this list in the order, in which the elements are updated or added ? e.g> If I execute zincrby A 100 g zincrby A 100…
Pranav
  • 2,054
  • 4
  • 27
  • 34
0
votes
1 answer

What does ping() in redis do?

we are using redis 2.6.14 with 10GB RAM as cache server and phpredis as redis client. We both write and read from one same redis server. The problem is, when the traffic goes high, we still can connect() this machine, but ping() it will return…
蒋艾伦
  • 464
  • 1
  • 5
  • 16
1 2 3
13
14