For session cookies, you need to override cookie settings:
So you can use:
ini_set('session.cookie_domain', '.website.com');
or
session_set_cookie_params(0, '/', '.website.com');
"." on the front panel makes it available under the domain and subdomains.
Note. You will need to delete all existing cookies from your browser for the domain you are working with so that they can be correctly initialized to work.
source share