Jump to content

do sessions work across subdomains?


dadamssg

Recommended Posts

All you gotta do is read the page corbin showed you. The answer is right in the parameters:

 

domain

 

    Cookie domain, for example 'www.php.net'. To make cookies visible on all subdomains then the domain must be prefixed with a dot like '.php.net'.

 

It doesn't get any easier, except if you are hoping for us to do the work for you, and that's not gonna happen.

 

do you have any idea how to use it? i don't want to set any other parameter besides the domain one.

 

 

The easiest way to do that would be to either do:

 

 

ini_set('session.cookie_domain', '.yourdomain.com');

 

 

Or you could do it in php.ini or in a .htaccess file.

 

 

http://us2.php.net/manual/en/session.configuration.php#ini.session.cookie-domain

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.