When you are using PHP sessions, you do not have to manually set cookies. The session functions take care of this task for you.
You can use the function session_get_cookie_params() to see the contents of the cookie set by session control. It returns an array containing the elements lifetime, path, domain, and secure.
You can also use
sesion_set_cookie_params($lifetime [, $path [, $domain [, $secure]]]);to set the session cookie parameters. The effect of this function lasts only for the duration of the script. Thus, you need to call the function for every request and before session_start() is called.