Is there a way to make a php session span through my www.domain.com as well as sub.domain.com??? just using session_start() and $_SESSION['foo'] = "bar" does not work...any suggestions? the PHP manual does not say anything about it.
Thanks
The default session tracking in PHP relies on cookies (PHPSESSID, by default, if memory serves).
You can set the domain using session_set_cookie_param() (but you must do so before calling session_start(), I think) -- or you can set it in php.ini, or .htaccess like:
php_value session.cookie_domain ".domain.com"
I'm sure there are other answers, but you could use session_set_save_handler to store your sessions in a database. http://www.php.net/manual/en/function.session-set-save-handler.php