I’m having trouble trying to keep session open in subdomains…
every place i read keeps saying
ini_set(‘session.cookie_domain’, ‘.my-domain.com’);
but this isn’t working for me. has anyone bumped into this issue? is there something else i’m missing?
http://epikcss.com/session.php?n=Something this is a domain i created on my server completely fresh, standard php.ini configs
session works fine until i go to sub domain.
I have no experience in this realm but applied a bit of “web scouring” (the next step up from a simple web search!) and
I found, in this discussion, a reference to [URL=“http://us3.php.net/session_set_cookie_params”]this call in place of the ini_set
.
Perhaps this will be helpful to you.
I’m currently using
<? session_set_cookie_params(3600, '/', '.domain.com');
session_start();
?>
Everytime i set a session in the root … then go to subdomain it resets. seems like the subdomain and the root are over writing each other. i figured it could be a server side config.
Yes, it could be a server configuration. Also, as I read something related to the path where the subdomain files exist. It seemed a bit weird to me but, IIRC, it works when the subdomain files are a child of the domain. Like this
server/domain/
server/domain/subdomain
and not like this
server/domain
server/subdomain