----- Original Message ----- From: "Merlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 12, 2004 3:56 AM Subject: [PHP] Making coockies valid for multiple domains possible?
> Hello everybody, > > I am working on translating my site into multiple languages (i18n). Each > different language is hosted on the same server, but on a different > subdomain. > > example: > de.server.com - german > en.server.com - english > > Here comes the problem. Sessions are validated through coockies on my > site. The system checks if the coockie is valid and compares it with a > sessionid inside the database. > > It seems to me that coockies are only valid for one domain for security > reasons. > > QUESTION: > Is there a way to make that coockie valid for multiple domains? > > Thank you for any help on that. > > Regards, > > Merlin > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > I've read the pages, it doesn't give very good examples from what I've seen, but here is the page: http://us2.php.net/manual/en/ref.session.php#ini.session.cookie-domain Someone correct me if I'm wrong, but if you set this in your php.ini or with session_set_cookie_params() to server.com, it's valid across any sub domains, whereas if you set it to de.server.com, it would only be valid in the de.server.com sub domain. Or possibly try *server.com. I havn't played with this, since I only use cookies when I manually set them, not for sessions. Hope this helps, Jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php