S
S
Sergey Beloventsev2018-09-30 17:35:50
Yii
Sergey Beloventsev, 2018-09-30 17:35:50

Why are not all cookies displayed?

I actually
do this,
Yii::error(Yii::$app->request)
among other things, I get

"cookie";a:1:{...
PHPSESSID=ndt576bmobbkl180eo63au4p60;
_csrf-frontend = 85bcad325cba64c1b0476dc2b38b6cd7d814579f9283f7a8364ae6546de47a42a% 3A2% 3A% 7Bi% 3A0% 3Bs% 3A14% 3A% 22
_csrf-frontend% 94% 3Bi% 3A1% 3Bs% 3A32 % 3A% 22WMEB7yRMbT0ATUhC-F-WP3C-Rh2kDU9e% 22% 3B% 7D ;
anonim_id=a9cf3a557f1f1a35a1e01051548f7d9aeba09f9b7ea8e143c65aba18c86cbfa0a%3A2%3A%7Bi%3A0%3Bs%3A9%3A%22anonim_id%22%3Bi%3A1%3BN%3B%7D

I do this
Yii::error(Yii::$app->request->cookies);
displayed
unserialize('O:24:"yii\\web\\CookieCollection":2:{s:8:"readOnly";b:1;s:34:"' . "\0" . 'yii\\web\ \CookieCollection' . "\0" . '_cookies";a:1:{s:14:"_csrf-frontend";O:14:"yii\\web\\Cookie":7:{s:4:" name";s:14:"_csrf-frontend";s:5:"value";s:32:"WMEB7yRMbT0ATUhC-F-WP3C-Rh2kDU9e";s:6:"domain";s:0:""; s:6:"expire";N;s:4:"path";s:1:"/";s:6:"secure";b:0;s:8:"httpOnly";b:1; }}}')

why are all cookies not showing up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-10-05
@webinar

What are you missing there? PHPSESSID? This is the session name and can be obtained like this: https://www.yiiframework.com/doc/api/2.0/yii-web-s...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question