2.3.4版本,appserver端/customer/site/captcha验证码,报错

bug问题 · Adia · 于 9天前 发布 · 57 次阅读

appserver端验证码,默认需要redis

{
"name": "Database Exception",
"message": "Failed to open redis DB connection (localhost:6379, database=4): 113 - No route to host",
"code": 113,
"type": "yii\\db\\Exception",
"file": "/web/fecmall/vendor/yiisoft/yii2-redis/src/Connection.php",
"line": 565,
"stack-trace": [
	"#0 /web/fecmall/vendor/yiisoft/yii2-redis/src/Connection.php(665): yii\\redis\\Connection->open()",
	"#1 /web/fecmall/vendor/fancyecommerce/fecshop/services/session/SessionRedis.php(31): yii\\redis\\Connection->executeCommand('SET', Array)",
	"#2 /web/fecmall/vendor/fancyecommerce/fecshop/services/Session.php(130): fecshop\\services\\session\\SessionRedis->set('77ba1398-ea9c-1...', '5236||####||157...', '86400')",
	"#3 /web/fecmall/vendor/fancyecommerce/fecshop/services/helper/Captcha.php(140): fecshop\\services\\Session->set('captcha_session...', '5236')",
	"#4 /web/fecmall/vendor/fancyecommerce/fecshop/services/helper/Captcha.php(121): fecshop\\services\\helper\\Captcha->setSessionCode()",
	"#5 /web/fecmall/vendor/fancyecommerce/fecshop/app/appserver/modules/Customer/controllers/SiteController.php(29): fecshop\\services\\helper\\Captcha->doBase64img()",
	"#6 [internal function]: fecshop\\app\\appserver\\modules\\Customer\\controllers\\SiteController->actionCaptcha()",
	"#7 /web/fecmall/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)",
	"#8 /web/fecmall/vendor/yiisoft/yii2/base/Controller.php(157): yii\\base\\InlineAction->runWithParams(Array)",
	"#9 /web/fecmall/vendor/yiisoft/yii2/base/Module.php(528): yii\\base\\Controller->runAction('captcha', Array)",
	"#10 /web/fecmall/vendor/yiisoft/yii2/web/Application.php(103): yii\\base\\Module->runAction('customer/site/c...', Array)",
	"#11 /web/fecmall/vendor/yiisoft/yii2/base/Application.php(386): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",
	"#12 /web/fecmall/appserver/web/index.php(79): yii\\base\\Application->run()", "#13 {main}"
],
"error-info": "No route to host"
}
共收到 4 条回复
Fecmall#19天前 0 个赞

2.3.4已经没有验证码了,默认是关闭的,已经uuid已经去除了

如果想使用验证码,需要使用uuid来对用户进行对应,需要开启redis的。

看报错,应该可以看出来原因的 "Failed to open redis DB connection (localhost:6379, database=4): 113 - No route to host

Adia#39天前 0 个赞

@Fecmall #1楼 好的

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics