鍍金池/ 問答/人工智能  PHP/ predis ERR unknown command 'EVAL'

predis ERR unknown command 'EVAL'

laravel版本:5.5.36
redis版本:3.06
在laravel項目中引用predis的時候,我在本地windows環(huán)境沒有問題,但是到生產(chǎn)環(huá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)境報錯如下:
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 : "->"

請問這是怎么回事?我的redis是在2.6已上

回答
編輯回答
萌面人

redis 版本低的問題,沒有eval 命令
詳見

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

你好,這個問題解決了么? 我也遇到這個問題了, 如果解決了、求幫助

2018年6月24日 15:34