Carrying sessions on subdomains

Hi,

I want to carry sessions from my main domain like www.domain.com to test.domain.com, but, i am unable to do it, i don’t want to make changes to php.ini file. So, i tried using:

ini_set(‘session.cookie_domain’, ’ .domain.com’); in my application, but, it didn’t work. So, i want to know , is there a way to achieve this using .htaccess file?

Please suggest!

Thanks,
Kul.

You have an extra blank and dot in front of the domain name that shouldn’t be there.

Thanks for replying but i tried this as well:

ini_set(‘session.cookie_domain’, ‘domain.com’);

But, it didn’t work, that’s why i was trying to do it using .htaccess file.