I have installed cPanel (EasyApache) for a domain (Domain1.com) Later i have added a new add on domain (Domain2.com), but when i am starting php session for domain2.com it is setting domain1.con cookie in chrome network response.
set-cookie: PHPSESSID=51gjk7jr3qnscrb250j97mibh6; expires=Sat, 09-Oct-2021 15:00:35 GMT; Max-Age=31536000; path=/; domain=.domain1.com
Also chrome is giving warning for this "This Set-Cookie was blocked because its Domain attribute was invalid with regard to the current host url".
Directory structure
public_html/ (for domain1.com)
public_html/mysubdomain/domain2/ (for domain2.com)
PHP Version used
php5.6 for domain1.com
php7.1 for domain2.com
Is their any setting in php.ini or any other for fix this ?