Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 29th, 2009, 05:20 AM
web_developer's Avatar
web_developer web_developer is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 381 web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_developer User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 19 h 57 sec
Reputation Power: 70
Question How to manage session in multiple Domain?

Hello I have multiple Domain.

like
www.test.com
www.abcTest.com
www.xyzTest.com

All have same Virtual Host Entry.. just created alias.

<VirtualHost *:80>
ServerAdmin xyz@localhost
DocumentRoot /home/xyz/web/www.test.com
ServerName www.test.com

ServerAlias www.abcTest.com www.xyzTest.com

php_value session.cookie_domain "www.test.com"
php_flag track_vars "On"
php_flag register_globals "On"
php_flag session.auto_start "On"
</VirtualHost>

In this case Session is working fine in "www.test.com" but it is not wokring for www.abcTest.com, www.xyzTest.com

Can anyone have an idea? what change is required? I want to make session globally for all domain.
__________________
I will try my best !!!

Last edited by web_developer : October 30th, 2009 at 12:25 AM.

Reply With Quote
  #2  
Old October 30th, 2009, 11:16 AM
stdunbar stdunbar is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 2,001 stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level)stdunbar User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 23 h 13 sec
Reputation Power: 788
You can't share cookies across domains. There are workarounds however. The most common is that your primary domain creates a web page that includes links to your other domains. Those links include information for the other domains to let them set a cookie too.

So, in your example, once you've logged in and created a session in "www.test.com", that page has an img tag that looks something like:

html4strict Code:
Original - html4strict Code
  1. <img height="1" width="1" src="http://www.abctest.com/sessionSetter?sessionId=1234" />


When the domain abctest.com gets the request it knows that the sessionId URL parameter is from test.com and it generates a cookie too. Because these are really shared domains you can then manage sessions on the back end with the multiple cookies.

Note that this isn't the prettiest setup in the world. It requires that all of the domains participating access data from each other.

What is your ultimate goal? Is this just a single signon across multiple domains? Or is it something else?
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Last edited by stdunbar : October 30th, 2009 at 11:18 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > How to manage session in multiple Domain?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek