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
42
votes
10 answers

LogicException: Please make sure the PHP Redis extension is installed and enabled

Laravel Version: 7.5.0 PHP Version: 7.2 Database Driver & Version: Redis Everything was working fine but suddenly this error appear i changed the phpredis to predis but error is same. Steps To Reproduce: I am calling the event function event(new…
UMAIR ALI
  • 1,055
  • 5
  • 14
  • 25
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
5 answers

Redis keys are not expiring - Laravel, Predis

I am using Laravel 5.4, with Predis and the latest Redis (or Redis for Windows). The keys are being saved without issue. So, I doubt it's a configuration issue. The problem is that they are not expiring. The key is reused until it expires...similar…
tinonetic
  • 7,751
  • 11
  • 54
  • 79
14
votes
2 answers

How to use SCAN with the MATCH option in Predis

I have previously used the KEYS command to search for keys matching a certain pattern in my Redis database. Since Redis 2.8, the SCAN command seems to be preferred over KEYS since it returns an iterator instead of scanning through the whole keyspace…
André Laszlo
  • 15,169
  • 3
  • 63
  • 81
13
votes
4 answers

Laravel + Redis Cache via SSL?

I am trying to connect to Redis with predis 1.1 and SSL, using information https://github.com/nrk/predis, where in the example the following configuration is used: // Named array of connection parameters: $client = new Predis\Client([ 'scheme' =>…
Lech Migdal
  • 3,828
  • 5
  • 36
  • 63
13
votes
2 answers

Is there a Predis documentation?

I was using phpredis and now I am also trying predis for my php applications, but I couldn't find a good documentation for the second one. There is a "How to use" in github, but I find it quite short. I checked the examples though and I noticed that…
x_maras
  • 2,177
  • 1
  • 25
  • 34
12
votes
2 answers

NOAUTH Authentication required. Laravel + Redis

I am getting error NOAUTH Authentication required. My laravel version is 5.3 and I am using predis 1.1.1 to connect redis. in etc/redis/redis.conf I have: bind 127.0.0.1 requirepass somepassword in .env file I have…
Mrunal Dadhi
  • 310
  • 1
  • 2
  • 12
11
votes
4 answers

Max Attempts Exceeded Exception queue laravel

I have created an application to send e-mails to more than one user but I am facing a problem when dealing with a large number of recipients. The error appears in a failed_jobs table Illuminate\Queue\MaxAttemptsExceededException: App\Jobs\ESender…
Fadi Sharif
  • 300
  • 1
  • 3
  • 11
11
votes
1 answer

Setting no key prefix in symfony4 for redis

I have a problem with proper configuration for redis in Symfony 4. I want to have no prefix before my cache item keys, but it is constantly showing. Here is my config/packages/framework.yaml (part related to cache): cache: prefix_seed: ztw/ztw …
Pawel
  • 145
  • 3
  • 8
7
votes
1 answer

How to have both clustered and non-clustered redis connections in laravel

Background In the past I was able to use a non-clustered redis just fine in my config like so: 'redis' => [ 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' …
abbood
  • 23,101
  • 16
  • 132
  • 246
7
votes
2 answers

Which one is better between predis and phpredis?

Which one should I choose and why between predis and phpredis ?I am using NGINX and Codeigniter.Thanks in advance
7
votes
1 answer

how can I flush all redis nodes through predis?

I am trying to test my cache was implemented with redis clustering (cluster by server not client). I have to flush redis every time I run a unit test. when I try to run flushdb command I got this error: Cannot use 'FLUSHDB' with redis-cluster. it…
6
votes
0 answers

Laravel 6 Horizon Redis Exception

I have an issue with my Laravel app - many errors in log like that: READONLY You can't write against a read-only replica. {"exception":"[object] (RedisException(code: 0): READONLY You can't write against a read-only replica. at …
user137
  • 629
  • 1
  • 8
  • 20
6
votes
3 answers

Fastest way to check key exists in redis - php

Is there any other faster way than EXISTS, to check if a key exists in redis or not? My problem is, I have over 1 million records in redis and I need to do a key_exists check. This should happen within 10ms. Any Ideas around this?
ArunKolhapur
  • 5,805
  • 4
  • 18
  • 31
6
votes
1 answer

ClassNotFoundException in SncRedisExtension Factory" from namespace "Predis\Profile" after composer update

Today after update composer packages I get error message. ClassNotFoundException in SncRedisExtension.php line 158: Attempted to load class "Factory" from namespace "Predis\Profile". Did you forget a "use" statement for…
Developer
  • 2,731
  • 2
  • 41
  • 71
1
2 3
16 17