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
46
votes
3 answers

How can I fix "Error: Formulae found in multiple taps"?

I want to install php54-redis. Yu:nginx Yu$ brew install josegonzalez/php/php54-redis ==> Installing php54-redis from josegonzalez/homebrew-php Error: Formulae found in multiple taps: homebrew/php/php54 josegonzalez/php/php54 Please use the…
soapbar
  • 2,411
  • 4
  • 18
  • 24
33
votes
10 answers

How to install redis extension for php 7

Referred this link https://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html And done following steps PhpRedis for PHP 7 (Skip it if you have different PHP version) Install required package apt-get install…
Prashant G Patil
  • 927
  • 1
  • 8
  • 22
33
votes
3 answers

Redis how to store associative array? Set or Hash or List?

I'm a bit confused with all the available storing options of Redis. I want to do something simple and I don't want to over engineer it. I'm working with phpredis and Redis v2.8.6. I have this simple associative array that I need to store. I also…
maxwell2022
  • 2,818
  • 5
  • 41
  • 60
18
votes
2 answers

Class "Redis" Not Found laravel 8, using phpredis

I am using laravel 8, and it is throwing error, when ever I tried to run: php artsian config:clear On laravel, this is my config value (because I am trying to use phpredis): 'client' => env('REDIS_CLIENT', 'phpredis'), I could use redis-cli and…
Aayush Dahal
  • 856
  • 1
  • 17
  • 51
18
votes
2 answers

Name or service not known [tcp://redis:6379]

i am having a problem setting up redis cache with laravel. i have a redis server runnig on my local machine: my .env: i have the localhost on port 6379 ready and listened: someone plz tell me what's happenig here?
oajmi
  • 187
  • 1
  • 1
  • 14
15
votes
6 answers

phpredis extension doesn't work, unable to load 'redis.so'

I installed nginx, php, php-fpm, php-pecl-redis by yum. All of them work but the last one. When I run /usr/sbin/php-fpm, I got this: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/redis.so' -…
pearzl
  • 323
  • 1
  • 2
  • 10
13
votes
4 answers

php-redis - Is there a way to store PHP object in Redis without serializing it?

I am trying to store user' request URL as the key and a PHP object corresponding to that key as the value in Redis. I tried the following: $redisClient = new Redis(); $redisClient->connect('localhost',…
Sai Wai Maung
  • 1,607
  • 6
  • 18
  • 28
12
votes
7 answers

Redis cli delete multiple keys

I have installed Redis in centos and I have multiple keys of redis like this, Product:: How can I delete all Product:*:* with CLI ? Redis version : 3.2.4 [ Latest I guess ] Thanks!
John FG
  • 131
  • 1
  • 1
  • 6
12
votes
1 answer

How to enable PHP redis extension on Travis

I'm running Travis CI for running my tests. I'm using the Trusty container with php v5.6. Here is my entire .travis.yml file: language: php dist: trusty php: - '5.4' before_script: - phpenv config-rm xdebug.ini - before_script: echo…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
11
votes
2 answers

How to set up PhpRedis in Laravel 5+?

Background Attempting to use PhpRedis in Laravel 5.3 on a Mac OSX local server running Apache 2.4.18, Php 7.0.14 and homebrew ...without requiring additional (non-official) composer libraries Redis is installed via homebrew install redis and…
goredwards
  • 2,486
  • 2
  • 30
  • 40
11
votes
1 answer

Installing php redis with igbinary, header file is not found

I'm trying to install the phpredis extension, but no luck. After running the command ./configure --enable-redis-igbinary, I've received the following error: checking for igbinary includes... configure: error: Cannot find igbinary.h igbinary was…
jonathancardoso
  • 11,737
  • 7
  • 53
  • 72
10
votes
8 answers

How to delete multiple redis keys with the same pattern in PHP using phpredis?

By using phpredis, I have saved some data in pagination like this: review/itemA/1 review/itemA/2 where 1 and 2 are page numbers. I read in the document that you can use wildcards to retrieve multiple keys. $allKeys = $redis->keys('*'); //…
RedGiant
  • 4,444
  • 11
  • 59
  • 146
10
votes
3 answers

How get all keys in redis using php redis?

I am using https://github.com/nicolasff/phpredis extension to access redis. I want to get all keys in redis from PHP code. I tried following code: $redis = new Redis(); $redis->connect('127.0.0.1', 6379); $allKeys =…
open source guy
  • 2,727
  • 8
  • 38
  • 61
9
votes
3 answers

phpredis errors Class Redis not found in Linux

I met a weied problem when installing phpredis by cd phpredis && ./configure && make && make install after that, I add extension=redis.so into php.ini. I can get an OK by running php -r "if (new Redis() == true){ echo \"\r\n OK \r\n\"; }" BUT…
kaitian521
  • 548
  • 2
  • 10
  • 25
9
votes
5 answers

PHP Redis timeout, read error on connection?

"PHP Fatal error: Uncaught exception 'RedisException' with message 'read error on connection'" The driver here is phpredis $redis->blpop('a', 0); This always times out after ~1 minute. My redis.conf says timeout 0 and…
Farzher
  • 13,934
  • 21
  • 69
  • 100
1
2 3
13 14