Re: session_start/session_write_close creates multiple sessioncookieheaders. How to fix this.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris wrote:
Mathijs wrote:
Chris wrote:
Mathijs wrote:
Hello again,

I Use session_write_close() so the page loads quicker because i use session on multiple place.
This because session has protection for race conditions.

Now it works very well and i don't have any problems at all.
I only see that there are multiple session cookie headers set.
I Personally think that one is enough :P.

How can i make it so that it just sets just one and not set this header every time i call session_start or session_write_close.
Because i don't know when the cookie is set.

I think this will be an either/or situation.

Either it only sends one session cookie header and you don't use session_write_close all over the place..

or, it sends multiple cookies and you do use session_write_close all over the place.

The internals of php would set this behaviour, not something you can change without changing the C code.


Hmmm...
I find it kinda strange that it sets the same uniqueId with the same session name more then once. It would be logical to just have one.. And overwrite the previous session cookie.
Any other thing would be an programmers fault in my opinion.
Because you can't have more then one session id per session cookie name.
Also, the browser won't send all the cookies back.
This is just useless overhead.

But it seems that i have to live with it (for now).
I think ill report this as an bug to PHP.

Doubt you'll get very far.

I could open 10 tabs in firefox and I'll have the same session id in each one, but they'll all be on different pages doing different things.

Even in IE, if I open a new page I'll get the same session id in both browser windows.

That is a good thing.
But the problem is that there are like 5 or 6 headers for one request.


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0629-1, 07/19/2006
Tested on: 7/20/2006 8:56:33 AM
avast! - copyright (c) 1988-2006 ALWIL Software.
http://www.avast.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux