Answer the question
In order to leave comments, you need to log in
Question on YII2. When you click on the captcha image, it changes, but the text, even if it is correct, writes that it is incorrect. What could be the problem?
The captcha itself is done as follows:
$form->field($model, 'captcha')->widget(\yii\captcha\Captcha::classname(), [
'captchaAction' => 'authorization/captcha',
]
)
captcha is in ActiveForm.
I can not figure out where the problem is and what. When refreshing the page, the captcha is not updated, but you can enter the same as before refreshing the page and you will get the correct input. Maybe someone faced such a problem?
Answer the question
In order to leave comments, you need to log in
change session store from default to database or store sessions in cache
'session' => [
'class' => 'yii\web\DbSession',
// 'db' => 'mydb',
// 'sessionTable' => 'my_session',
]
or so
'session' => [
'class' => 'yii\web\CacheSession',
// 'cache' => 'mycache',
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question