One thing to note is that sessions themselves don't go anywhere. As long as the client provides the same session ID on each request, the server will know which session to open.
Thus, the real problem is that your session ID isn't being propagated from the 'www.' request to the (null subodmain) request. As such, I'm guessing you're using cookies to propagated the SID, correct?
By default, PHP will output cookies for whatever domain that was used to make the request. However, if you use domain values such as '.mysite.com', the leading '.' actually matches any subdomain - including the null subdomain. As such, you'll want to use something like [man]session_set_cookie_params/man before every call to session_start() or else modify your PHP config (the See Also section on the previously linked man page will point you to the right PHP directives).
EDIT: I knew it. NogDog beats me to it yet again.