S
S
Sergey Okhonko2015-11-29 16:42:18
Yii
Sergey Okhonko, 2015-11-29 16:42:18

Why are cookies not coming from the remote server?

I uploaded the site to the hosting and I don’t get cookies from there, although everything is fine on the local server
here are the server settings radio.colocall.com/index2.php
like this I set the cookie

$cookie = new CHttpCookie('user', serialize($model));
      $cookie->expire = time() + 1800;
      Yii::app()->request->cookies['user']=$cookie;

but from another action on request var_dump(Yii::app()->request->cookies['user']); I get NULL;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2015-11-29
@R0dger

Try simply using PHP to set a cookie
, maybe it's not in Yii itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question