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

Modify array returned via PHPRedis pipelines to include the key as the index of each array element

I am using phpredis in my application and I have the following data structure. The account Id acts as the key for each user: $data = array( "accId1"=> array("userId" => "user0234", "username" => "apples", "appversion" => "1.0"), …
Priyath Gregory
  • 927
  • 1
  • 11
  • 37
0
votes
0 answers

phpredis rpop returning false when key exists

I'm building a game application that uses redis and this is my php script. connect('127.0.0.1', 6379); //receive the data as json //$data =…
Pfrex
  • 159
  • 2
  • 13
0
votes
0 answers

Getting redis keys from a server

Hello I'm using redis as a game developer and I'm having a tricky issue that I've debugged extensively. Basically, I have a variable on my game client that gets set with a key from redis using phpredis. On my game client: my_user =…
Pfrex
  • 159
  • 2
  • 13
0
votes
1 answer

Uncaught RedisException: session_write_close()

So I have a website running joomla, and I tried setting the session handler to redis from CMS admin dashboard. I am getting the following error on homepage and every other page of the website I visit. Error: Failed to start application: Connection…
Mohd Abdul Mujib
  • 13,071
  • 8
  • 64
  • 88
0
votes
0 answers

PHP Redis Config - Any time limit issue?

I'm new to redis. I'm using redis in ubuntu with PHP. My actual process is: 1) read existing records from db table and keep its key in redis db. 2) read data from a file and keep all the keys in redis. 3) compare the keys and do some process…
mockdev
  • 13
  • 3
0
votes
0 answers

Laravel 5.5 PHPredis not working

I am fighting with phpredis + laravel 5.5. (PHP 7.2, nginx, ubuntu) The following code works well. That means the server is configured properly. Also the redis-cli works ok. $redis = new Redis(); $con = $redis->connect('127.0.0.1',…
Peter Matisko
  • 2,113
  • 1
  • 24
  • 47
0
votes
1 answer

Array to String conversion on phpredis zScan

When using a sorted set and doing a zScan call on it, I get a Notice for Array to String conversion and I do wonder where that comes from. Does anyone have an idea? This is the code: $redis = new…
4thfloorstudios
  • 388
  • 1
  • 6
  • 16
0
votes
1 answer

laravel 5.4 redis server ddos attack

I setup Laravel 5.4 app with redis server. I got some ddos attack on my server and I got my redis server cache unknown info, like some-email|some-ip. here's a screenshot : I changed the old port and set require password. And I also changed redis…
Mido Mido
  • 1
  • 2
0
votes
1 answer

Laravel 5.1 Redis - create cache for existing data

I am looking for some way to create cache for the existing data I have in laravel db. I have searched around the web. There are plenty of tips on how to enable caching for new data but none for existing. Example would be a large number of…
techwestcoastsfosea
  • 686
  • 3
  • 10
  • 21
0
votes
2 answers

RedisLab with WordPress Integration Error: PHP Warning: Redis::select() expects parameter 1 to be integer

I am trying to add a Redis object cash server with my WWrdPress site. I am following this article and I've crated account in redislabs.com As per the tutorial, my object-cache.php file has define("WP_REDIS_BACKEND_HOST", "HOST_URL"); …
Ariful Haque
  • 3,662
  • 5
  • 37
  • 59
0
votes
1 answer

PhpRedis Error Exception Illegal offset type in unset or Php fatal error php call to undefined method share() - Laravel 5.4

I am trying to get started with PhpRedis in Laravel 5.4 and in this link: https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736 it says to change share() function to singleton() as share is no more supported in Laravel…
Murlidhar Fichadia
  • 2,589
  • 6
  • 43
  • 93
0
votes
0 answers

Subscribe Command keeps executing while using PHPREDIS

I am using PHP_redis on windows to connect to redis and I am trying to create a simple chat app using publish and subscription command. The publish command works fine and I am able to see messages using redis-cli.exe , but I am not able to get it…
Nadir
  • 126
  • 1
  • 11
0
votes
0 answers

Redis list behavior

I have configured the phpredis. When I set only 10 values in a list called tutorial list and call for the range 0, 9, I get all the values correct. But when I try range 0, 100 or 0, 267, I still get like 29 or 39 values. Why am i seeing the…
Somename
  • 3,376
  • 16
  • 42
  • 84
0
votes
1 answer

adding a set of integers to Redis using phpredis

I am trying to add a SET of integers (sadd) via PHPRedis extension. $Client->sadd('key',1,2,3); or call_user_func_array([$Client,'sadd'],[1,2,3]); In the monitor I get: "SADD" "key" "i:1" "i:2" "i:3"` Which means it is serialized. How do I do…
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
0
votes
0 answers

Redis fails to create a database snapshot larger than 5120000 bytes

When database is larger than 5120000 bytes Redis fails it to save and crushes. I run it on Ubuntu Server 14.04, Redis v.3.0.1. I updated /etc/sysctl.conf vm.overcommit_memory = 1 net.core.somaxconn=1024 and /etc/rc.local echo never >…
user3376996
  • 111
  • 1
  • 7