S
S
SLaMeeR2016-08-24 21:03:06
PHP
SLaMeeR, 2016-08-24 21:03:06

What is the problem with Redis?

Installed radish. Everything seems to be fine, no errors.

But when I go to the site, the following error is displayed: Fatal error: Class 'Redis' not found in /

In the file itself, this code:

<?php
$redis = new Redis();
$redis->connect('localhost:6379');
?>


What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2016-08-24
@SLaMeeR

you need to put also https://github.com/phpredis/phpredis

I
Ilya Chubarov, 2021-07-21
@agoalofalife

I ’ll answer, maybe it will help someone
. I had such a problem on mas os
as an option in the database.php configuration, change redis -> client from phpredis to predis
and after doing composer require predis / predis, install
the second option via gihub extension and add to php.ini
here like here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question