easywechat Failed to fetch key access_token
不管是原来的还是redis都报下面的错误。有没有大佬解决这样的问题?影响到了线上的项目了。用的基于thinkphp5.1的fastadmin框架。
- easywechat 版本4.x
- igbinary已安装
$config = [
'app_id' => $this->wechatAppid,
'secret' => $this->wechatAppsecret,
];
$app = Factory::officialAccount($config);
$redis = \think\Cache::store('redis')->handler();
$cache = new RedisAdapter($redis, $namespace = '', $defaultLifetime = 0);
$app->rebind('cache', $cache);
$res = $app->template_message->send($data);
总是报这些问题
[ 2024-04-03T18:52:38+08:00 ][ error ] [512]Failed to fetch key "easywechat.kernel.access_token.a5f06943e79b873c805ef86e54fa7586": Failed to unserialize values, did you forget to install the "igbinary" extension?
error
[ 2024-04-03T18:52:38+08:00 ][ error ] [0]Type error: Return value of EasyWeChat\Kernel\AccessToken::getToken() must be of the type array, null returned
error
defaultLifetime 这个值设置多点,不要为0
自己封装一个多好用
没有人遇到吗
不是给提示了吗