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
0
votes
1 answer

Mapping primary keys in MySQL to Redis

I have a mysql db, with a table having attributes: p1,p2, p3, c1, c2, c3, where p1, p2, and p3 are the primary keys. Now the problem is, I want to map this to Redis in a "time-efficient" manner, and if possible, "space-effective" too. This is what…
Yo Yo Money Singh
  • 679
  • 3
  • 11
  • 22
0
votes
0 answers

php push notification to specific user via nodejs (socket.io) and redis

I trying to push notification to specific client with nodejs and redis but emitting the notification to the requested user is not working my codes in php and nodejs and client is below: //Nodejs Server --------------------------- var io =…
0
votes
1 answer

Redis latency measurement using php script

Pardon me for asking this basic question. I have installed redis and predis (client library) on my local ubuntu machine. Now, I am doing certain SET/GET operations in my php script. I just want to know how may I "exactly calculate" the time redis…
Yo Yo Money Singh
  • 679
  • 3
  • 11
  • 22
0
votes
1 answer

PHP, Redis and ORM?

I know that ORM and redis is weird enough but. My redis server is a storage (not temporary). So I discovered some queries and commands but now I want to know how to use it in best way. As everybody know ORM is good enough (ActiveRecord, Doctrine2,…
user1954544
  • 1,619
  • 5
  • 26
  • 53
0
votes
1 answer

Querying arrays in Redis with Predis

I want to to store and "SELECT" arrays in Redis with Predis, I entered data as follow: $redis->hset("account_id_".$account_id, "access_time", time()); So I have this structure stored in redis db0 account_id_1 access_time: 1400901850 …
Michele
  • 1,468
  • 3
  • 24
  • 54
0
votes
1 answer

Redis only using 1 key in database

I have setup Redis as a caching mechanism on my server with a Wordpress site. Basically on each request I check if a cache of the page exists and then I show the cache. I'm using Predis (https://github.com/nrk/predis) as an interface to the redis…
Patrick Steenks
  • 612
  • 1
  • 11
  • 24
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
3 answers

Installing Predis Error : Download of "nrk/Predis" succeeded, but it is not a valid package archive

I've a new EC2 instance with PHP 5.5.4 and I am trying to install Predis from Pear. Every time I try to install Predis from pear I keep having the following error. Anyone has an idea on why is this happening? I googled lots for a solution and I cant…
Jonathan Thurft
  • 4,087
  • 7
  • 47
  • 78
0
votes
0 answers

Predis not saving parts of JSON string

I'm trying to save a JSON representation (json_encode) of $_SESSION in Cakephp into Redis using Predis library. Here is the $_SESSION raw: { ["Config"]=> array(3) { ["userAgent"]=> string(32) "ebbd08f362083e95a8eb3bd1d4712648" ["time"]=>…
James
  • 726
  • 2
  • 7
  • 20
-1
votes
2 answers

How to use redis "memory usage keyname" command with laravel facade redis? we can use all command except memory command

We can use below commands in laravel. $user = Redis::get('user:profile:'.$id); $values = Redis::lrange('names', 5, 10); $values = Redis::command('lrange', ['name', 5, 10]); but can't use memory usage keyname command with laravel redis facade.
-1
votes
1 answer

No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379] - codeigniter

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…
S.M_Emamian
  • 17,005
  • 37
  • 135
  • 254
-1
votes
1 answer

Redis/Laravel - Keep getting error: Unknown prefix:

I have been searching and searching for any information regarding this redis error, but so far have not found any information. Any help would be greatly appreciated. Here is my setup: Laravel with 2 redis connections, 6379 for cache, and 6380 for a…
Daniel
  • 1,403
  • 1
  • 14
  • 30
-2
votes
0 answers

Array to string conversion error: Predis PHP, redis local server

my problem lies in a single error that I can't solve. In order to develop an instant messaging system, I use a redis server and then a library called predis for php to send events to an SSE instance when a message is sent. Here's my connection code…
-2
votes
2 answers

Why haven't install predis on laravel 8

According laravel manual https://laravel.com/docs/8.x/redis for install predis, need run: composer require predis/predis. When that command is running (for laravel 8) - appear next Error: Your requirements could not be resolved to an installable set…
1 2 3
16
17