As we know that the PHP session ids are saved in Cookies. To make a cookie available in all the sub-domains, we need to assign it to the root domain. Then all the sub-domains will get the session id from cookie and PHP can find the session using passed session id.