If you are using CakePHP with domain and subdomain together, you’d need to enable Session in Cake for both domains. If not, Cake will set session only to the specific domain.
To enable the session for both domain and subdomain:
Go to
app/config/bootstrap.php
Enter
ini_set('session.cookie_domain', 'domain.com');