cancel
Showing results for 
Search instead for 
Did you mean: 

redis error with cache:clean

SOLVED

redis error with cache:clean

Greetings,

 

How do I clear cache without Redis? 

 

Which directories are cleared with cache:clean?

 

I restored a 2.2.6 backup got this message

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/site/public_html/vendor/magento/zendframework1/library/Zend/Cache/Backend.php on line 79
An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message.

 

>>> when I try to clear cache with php bin/magento cache:clean or flush, Redis Error <<<

 

Thanks for your attention.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: redis error with cache:clean

Hi @Sheba 

each() function is deprecated in php 7.2 so change this function to foreach()

Change

 while (list($name, $value) = each($options)) {
        $this->setOption($name, $value);
    }

To 

foreach ($options as $name => $value){
        $this->setOption($name, $value);
    }


If issue resolve, please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

View solution in original post

2 REPLIES 2

Re: redis error with cache:clean

Hi @Sheba 

each() function is deprecated in php 7.2 so change this function to foreach()

Change

 while (list($name, $value) = each($options)) {
        $this->setOption($name, $value);
    }

To 

foreach ($options as $name => $value){
        $this->setOption($name, $value);
    }


If issue resolve, please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: redis error with cache:clean

Thank YOU!!!Smiley Happy