鍍金池/ 問(wèn)答/人工智能  PHP/ predis ERR unknown command 'EVAL'

predis ERR unknown command 'EVAL'

laravel版本:5.5.36
redis版本:3.06
在laravel項(xiàng)目中引用predis的時(shí)候,我在本地windows環(huán)境沒(méi)有問(wèn)題,但是到生產(chǎn)環(huán)境就有問(wèn)題了。
我的代碼如下:

    public function getPhoneCode()
    {
        Cache::rememberForever('getAllPhoneCodeMultiViewData', function () {
            return Area::where('status', 1)
                ->whereIn('level', [2, 3])
                ->orderBy('pinyin', 'asc')
                ->get(['id', 'english_name', 'chinese_name', 'iso2', 'area_phone_number', 'pinyin']);
        });

        return Cache::get('getAllPhoneCodeMultiViewData');
    }

緩存配置使用的是redis,生產(chǎn)環(huán)境報(bào)錯(cuò)如下:
exception=PredisResponseServerException
file=/bcc/production/BCCKidV1.0/vendor/predis/predis/src/Client.php
line=370
message=ERR unknown command 'EVAL'

class : "PredisClient"
file : "/bcc/production/BCCKidV1.0/vendor/predis/predis/src/Client.php"
function : "onErrorResponse"
line : 335
type : "->"

請(qǐng)問(wèn)這是怎么回事?我的redis是在2.6已上

回答
編輯回答
萌面人

redis 版本低的問(wèn)題,沒(méi)有eval 命令
詳見

2017年4月1日 10:06
編輯回答
扯機(jī)薄

你好,這個(gè)問(wèn)題解決了么? 我也遇到這個(gè)問(wèn)題了, 如果解決了、求幫助

2018年6月24日 15:34