PDA

View Full Version : carrying sessions through subdomains


Phip
01-11-2003, 09:31 PM
Pretty much what the title says. I have three or four subdomains that the session needs to carry through. The session is registered on domain.com but gets lost at sub.domain.com etc. And when I destory the unregister the session it leaves it on subdomains.

firepages
01-12-2003, 02:18 AM
If you look in the user notes in the manual entry for http://www.php.net/manual/en/function.session-set-cookie-params.php

it shows how to set the session cookie across sub-domains.

that , or elect not to use cookies in your sessions eg

ini_set("session.use_cookies","0");

Phip
01-12-2003, 08:42 PM
thanks, for some reason i never came a crossed that.