Search code examples
phpcakephprediscakephp-2.4cakephp-2.x

Cache engine search is not properly configured Cakephp 2.4.3


Cake version: 2.4.3
PHP: 5.6
Redis: 6.0
Docker: 3.1

I am running a cake project 2.4.3 and have an error

Cache engine search is not properly configured.
Error: An Internal Error Has Occurred.

APP\Config\bootstrap.php line 159 → Cache::config(string, array)

'search'
array(
    'port' => '*****',
    'prefix' => '*****',
    'engine' => 'Redis',
    'server' => '172.30.1.5',
    'duration' => (int) 1
)

How can I fix this? Thank everyone!


Solution

  • I found out the problem is that my PHP 5.6 extensions are not Redis enabled

    Install Redis extension PHP5.6

    apt-get install wget
    mkdir ~/redis
    cd ~/redis
    wget  https://pecl.php.net/get/redis-2.2.8.tgz
    tar zxpf redis*
    cd redis*
    phpize
    ./configure --with-option=/path/etc
    make && make install
    

    Edit file php.ini add

    extension=redis.so
    

    And restart server. enjoy!