1) the subdomains should use the same path to save session files
2) modify your
php.ini session.cookie_domain = ".example.com"
or .htaccess php_value session.cookie_domain .example.com
or inside of the script ini_set('session.cookie_domain', '.example.com' );