[PHP] Problems with sessions .. qualified/non-qualified domain names

2006-01-03 Thread Kall, Bruce A.
I have diagnosed a problem with sessions I am having.  I'm don't believe 
it's necessarily a PHP problem, but I thought someone must have seen 
this before.


The first thing I do is a

session_start()

and then determine if (using session variables) whether the user has 
logged in successfully using a password and their session has not timed 
out (to some value I keep track of, not the php.ini variables). Anyway, 
if I come in to my site using a fully qualified domain name such as


http://mysubsite.mycompany.com/index.php

and start a session and then have the user log in, I then pass them 
along to:


http://mysubsite/index.php

internal to my organization (using the non-qualified domain name).  But 
this starts a different session than the one they came in as, so this 
user now has two different sessions, the one that determined they needed 
to log in on (using the fully qualified domain name) and the second 
session that was started after they logged in (using the non-qualified 
name).


I see this problem when you set your default browser 'home' page to be

http://mysubsite.mycompany.com/index.php

and attempt to use that.  Every time you click on that (after you've 
logged in initially and haven't timed out) you go immediately to a login 
window since that session is still around and was never logged in.


If my default browser home page is:

http://mysubsite/index.php

you then get into the session that was started after you log in.

The reason I think this issue must have come up for someone before is 
that almost all of my users should be able to use


http://mysubsite/index.php

BUT if you're coming in (from home for example), you need to come in as
http://mysubsite.mycompany.com/index.php for it to find my site.

Is there some way for a session to be registered to both?

mysubsite.mycompany.com  (using the fully qualified domain name)
 AND
mysubsite  (using the non-fully qualified domain name)


Thanks,
Bruce

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT ??: Form posting without leaving form

2005-06-16 Thread Kall, Bruce A.
Thanks.  This worked out to be the best solution of the suggestions I 
had received.  I've implemented it and it works as advertised.


Bruce


John Browne wrote:

Check out the xmlhttp object in Javascript:

http://jibbering.com/2002/4/httprequest.html


On 6/13/05, Kall, Bruce A. [EMAIL PROTECTED] wrote:


This is perhaps a javascript question

Is there a way to post a form to a url without having a user submit from
the form?

I have a php web page that is a detailed form with a lot of fields.  If
the user does some work on this form and let's it sit, their session can
time out (I had this happen to the user after it sat for 2 hours).  Is
there some way to have a timer in the page and have partial form results
sent back to the server, but still leave the form on the screen as-is?
In other words, I want to have the client periodically post the form
data back to the server, but leave the same web page displayed.

Thanks,
Bruce

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OT ??: Form posting without leaving form

2005-06-13 Thread Kall, Bruce A.

This is perhaps a javascript question

Is there a way to post a form to a url without having a user submit from 
the form?


I have a php web page that is a detailed form with a lot of fields.  If 
the user does some work on this form and let's it sit, their session can 
time out (I had this happen to the user after it sat for 2 hours).  Is 
there some way to have a timer in the page and have partial form results 
sent back to the server, but still leave the form on the screen as-is? 
In other words, I want to have the client periodically post the form 
data back to the server, but leave the same web page displayed.


Thanks,
Bruce

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php