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? thank you dizyn
1. The session cookie should be set for the domein .cmela.com, not for any of the subdomains. 2. The session data should be stored in the same place for all three subdomains. If you store them on your file system you should use the same directory for all, if you store them in a database, use the same database for every subdomain.
i used: ini_set('session.cookie_domain', '.cmela.com'); but no luck, Please tell me how can i store session data on one place? thank you
Depends on which handler you use. Assuming you store sessions on the file system the session use session_save_path($path); with $path being the same for all subdomains before session_start() is called. Calling session_save_path() without a parameters returns the currently used path. It really helps to try and understand the session mechanism in PHP. It can be a tough read but it is nearly impossible to tweak session handling if you don't understand what you are doing: Session docs on php.net
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?