Page 1 of 1

session problem

Posted: Wed Feb 06, 2008 5:23 am
by itsmani1
I 3 sub domains, I log on to one domain and want to retain that login for all three sub domains.

Example:

If I logged on to beta.cmela.com session is working fine there but I want to retain that session for classifieds.cmela.com and community.cmela.com as well.

what should i need to do for it?

I also did:

Code: Select all

ini_set('session.cookie_domain', '.cmela.com');
thank you
dizyn

Re: session problem

Posted: Wed Feb 06, 2008 6:52 am
by itsmani1
In my settings:

and my session.save_handler value is: "files"
session.save_path: "no path" -> can i set a value for it? do i need to set a value for it?

session.cookie_path value is: /
will this save data in current directory in which i am?

Re: session problem

Posted: Wed Feb 06, 2008 8:06 am
by Zoxive
Is

Code: Select all

ini_set('session.cookie_domain', '.cmela.com');
being called before session_start() ? And if so, is session.autostart off?

I usually put this in my php.ini, or .htaccess instead of setting it with ini_set.

Re: session problem

Posted: Wed Feb 06, 2008 11:38 am
by Christopher
Are the three domains on the same server? Do they share the same session files?

Re: session problem

Posted: Thu Feb 07, 2008 5:48 am
by itsmani1
Yes they are on one server, there are three sub domains and i want to share the session between these three domains, once i set session for one it should work for other two domains as well.

Here are my session settings:
session.save_handler = files
session.save_path = no path
session.cookie_path = /

thank you
dizyn