I have 2 different domain, let\'s call them www.foo.com and bar.foo.com. The first one is built with CI, and the second one is built with Symfony. I want to share my session
You need to set up the session cookie's domain so that it is accessible from both sites.
Either add that to both sites's PHP code very early on in loading, or add something like this to your .htaccess file in both sites.
php_value session.cookie_domain ".foo.com"
I'm not 100% sure the second options works, but I think it should.