Can I set the domain for the PHPSESSID cookie?

When I visit my site without using the www before the domain, PHP sets its PHPSESSID cookie for that domain (without the www). However, my secure checkout pages are on www.domain.com. So when the user is redirected, his/her session variables are gone… a new PHPSESSID cookie has been set for ‘www.domain.com’ and this session is empty… So my user’s shopping cart has dissapeared on them at this point.

Is there a way I can force the domain that PHP uses to read/write its PHPSESSID cookie?

Thanks

Devin

See http://us2.php.net/manual/en/function.session-set-cookie-params.php
and http://www.sitepoint.com/forums/showthread.php?t=196272